Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am using the Qlik Sense .Net SDK to load an Application.
Sometimes when I use the statement below to load an app I get a Timeout Exception. Is there a way to set the Timeout Value?
ILocation location = Qlik.Engine.Location.FromUri(new Uri(sQlikSenseServer));
location.AsNtlmUserViaProxy(proxyUsesSsl: false);
IAppIdentifier appIdentifer = location.AppWithNameOrDefault(sQlikSenseApplication);
var app = location.App(id); // This statement sometimes gets a Timeout Exception
Thank You,
Yes, there is a setting for it. You can use this one:
It's a static, global property so you can set it directly. If you don't care about timeouts, you could write like this:
JsonRpc.Timeout = Int32.MaxValue;
Another option would be to use the async version of App. That way you can control the timeout behavior yourself:
Yes, there is a setting for it. You can use this one:
It's a static, global property so you can set it directly. If you don't care about timeouts, you could write like this:
JsonRpc.Timeout = Int32.MaxValue;
Another option would be to use the async version of App. That way you can control the timeout behavior yourself:
I am calling the same app multiple times and it gives an exception on the 4th call. "Websocket closed unexpectedly(endpoint unavailable)"
var location = Location.FromUri(_baseUrl);
location.AsJwtViaProxy(token);
IAppIdentifier foundAppIdentifier = location.AppWithNameOrDefault(appName);
using (var app = await location.AppAsync(foundAppIdentifier.AppId)){}
//I used debug console and found this:
{
[2024-06-17T18:35:07.055Z] "jsonrpc": "2.0",
[2024-06-17T18:35:07.057Z] "method": "OnMaxParallelSessionsExceeded",
[2024-06-17T18:35:07.059Z] "params": {
[2024-06-17T18:35:07.065Z] "severity": "fatal",
[2024-06-17T18:35:07.067Z] "timestamp": "2024-06-17T18:35:07.0140386Z",
[2024-06-17T18:35:07.068Z] "message": "Access to the app is denied: MaxParallelSessionsExceeded"
[2024-06-17T18:35:07.070Z] }
[2024-06-17T18:35:07.071Z] }
//stack trace
at Qlik.Engine.Communication.QlikConnection.AwaitResponseTask[T](T task, String methodName, CancellationToken cancellationToken)
at Qlik.Engine.Communication.QlikConnection.AwaitResponse(Task task, String methodName, CancellationToken cancellationToken)
at Qlik.Engine.Communication.QlikConnection.Ping()
at Qlik.Sense.JsonRpc.GenericLocation.DisposeOnError(IDisposable o, Action f)
at Qlik.Engine.LocationExtensions.Hub(ILocation location, ISession session)
at Qlik.Engine.LocationExtensions.AppsWithNameOrDefault(ILocation location, String appName)
at Qlik.Engine.LocationExtensions.AppWithNameOrDefault(ILocation location, String appName)
This article will probably help you on dealign with this problem: Deal with Qlik Sense Sessions | Qalyptus Blog