Skip to main content Skip to complementary content

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

Information noteThis example only works in a Qlik Sense Desktop environment and will be rejected when working through the Qlik Sense Proxy (Qlik Sense Server environment).
            ISession randomSession = Session.Random;

Example: Fully globally unique session for remote and local Qlik Sense installation

Information noteThe example below works for remote and local Qlik Sense access and will not be rejected when working through the Qlik Sense Proxy (Qlik Sense Server environment).
            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.

Information noteThe example below works for remote Qlik Sense access and will not be rejected when working through the Qlik Sense Proxy (Qlik Sense Server environment).

Example: Custom session

            ISession customAppSession = Session.WithApp(newAppIdentifier, "MyCustomSession");

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!