Qlik Community

Ask a Question

Integration, Extension & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
daniellw
Partner
Partner

.NET-API: disconnect, selection in sheets

Hello community,

i'm using the qlik sense .net api to connect to an existing/open qlik sense app and change the current selection. This works essentially, but i have two issues/questions regarding to it:

1. How can i explicitly disconnect the connection from the .net api to the qlik sense server? Is it possible somehow? I ran into the problem, that when connecting multiple times in a short period of time (like a few minutes or so), i'm getting the error of too many parallel session connections.

The dispose-methods obviously do not disconnect, as the problem remains when calling them.

2. Our qlik sense app contains different sheets. I would like to change the selection of specific sheets, but i only found the .net api for change the selection of an entire app. Is it possible to change the selection of a specific sheet, e.g. when working with two different sheets of the same app in two browser tabs?

Here is an example how i use the .net-api at the moment for selection (sso for login):

 

qLoc = Qlik.Engine.Location.FromUri("https://qsserver/hub:443");
qLoc.AsNtlmUserViaProxyAsync(true, null, false).Wait();
qAppId = Qlik.Engine.LocationExtensions.AppWithId(qLoc, "guid", true);
qSession = Qlik.Engine.Session.WithApp(qAppId, Qlik.Engine.SessionType.Default);
qApp = Qlik.Engine.LocationExtensions.App(qLoc, qAppId, qSession, true, false);

qField = qApp.GetField("fieldname", "");
qField.Clear();
qField.Select("value", true, 0);

 

Thank you and best regards

Daniel

Labels (3)
3 Replies
Damien_Villaret
Support
Support

Hello @daniellw 

1. This is a license limitation, you can only open up to 5 sessions in a 5 minutes time interval, so even if you were to close the app, you would still need to wait 5 minutes after it's closed to open a new session and perform further actions.

This limitation does not apply to Qlik Analytics Platform (QAP) and other core-based licenses.

 

2. You would need to do it as two different identities OR switch all objects on the other sheet to a different alternate state.

If the issue is solved please mark the answer with Accept as Solution.
daniellw
Partner
Partner
Author

Hello @Damien_Villaret 

thank you for your answer. If i got you right, there is no method to disconnect a .NET-API connection/session explicitly?

Damien_Villaret
Support
Support

Hello @daniellw 

My point is that disconnecting the .NET API connection will not help solving your issue, as there is a licensing limitation that you can only open 5 sessions within a 5 minutes time interval, so even if you close all sessions, you would still need to wait until you can open a new one and perform new API calls.

You should purchase a core-based license if you want to get rid of that limitation, or restructure your code to reuse the same session.

You can read here a bit how sessions are counted: https://community.qlik.com/t5/Qlik-Sense-Deployment-Management/Qlik-sense-concurrent-sessions/td-p/1...

If the issue is solved please mark the answer with Accept as Solution.