Step 3 - Sessions
Engine sessions are used so the client can display the same content disregarding of the platform used to access Qlik Sense.
When you are connecting to a Qlik Sense app you are working with engine sessions. The engine session specify who should see changes in an app, and they are based on combining userId and session key. If you open an app, make changes and close the app this is done within a single engine session. All users who are in the same engine session are experiencing the same thing. The server creates a new session object for each new user, and destroys the session object when the session expires. The engine session object contains information that identifies the user, it stores information about, or change settings for a engine session.
Default session
A default session is normally used when connecting to the Qlik Sense hub and should not be used when connecting to a Qlik Sense app.
Example: Default session
ISession defaultSession = Session.Default;
Fully globally unique session
A fully globally unique session is used when semi-private access to a Qlik Sense app is required.
Example: Fully globally unique session for Qlik Sense Desktop installation
ISession randomSession = Session.Random;
Example: Fully globally unique session for remote and local Qlik Sense installation
ISession randomAppSession = Session.WithApp(newAppIdentifier, SessionType.Random);
App sessions
By default, an app session is tied to an identified Qlik Sense app and is automatically shared with other clients.
Example: App session
ISession appSession = Session.WithApp(newAppIdentifier);
You can override the default behavior and manually add a session object when connecting to a Qlik Sense app.
Example: Add session object when connecting to a Qlik Sense app
using (IApp app = location.App(newAppIdentifier, randomSession))
{
//..
}
Custom session
Custom sessions are used when semi-private access to a Qlik Sense app is needed.
Example: Custom session
ISession customAppSession = Session.WithApp(newAppIdentifier, "MyCustomSession");
Learn more
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!