XenApp 6.5 Application States (App States)
The reason why I’m posting this blog is that I have been asked by a few times now by colleagues as to what app states are? I thought it makes sense to share with the wider community as it gives a better understanding in troubleshooting application connection issue.
Starting with XenApp 6.5 we have introduce a new tracking state for sessions. This additional value has been added to track the lingering and prelaunch states specifically and in addition for the purpose of sessions sharing. This is called the Application State, or just App State. This information can be view in the Application Centre Console or via PowerShell commands SDKs.
First of all we are not trying to replace the existing remote desktop services session states; we are building on top of this to describe the various status of the application within the session. These application states will still apply active or disconnected.
The Application State is broken down into five different statuses:
- APPLICATION NOT RUNNING
This state is reserved for console sessions, listeners, RDP sessions and ICA server session that never have apps running inside of them. These sessions therefore have no app state (N/A no app). These sessions are ignored for the purposes of the session sharing/prelaunch/lingering.
This means that apps are running in the session that the user has launched. This corresponds to the existing behaviour of session state active. Pre-launch and lingering have the ability to become active once a user requests another app and the connection made to these sessions is successful
This is app state represents an application that has been preconfigured for pre-launch status. When the user authenticates against receiver, a session is started enabling users to launch their apps quickly by sharing this existing session. It has no active apps running inside the session.
This app state happens when an active application has been closed in a session. This still leaves the session still active so it can be shared quickly when other applications are launched.
Application Not Running
This is the most interesting app state, which tends to confuse sometimes. These are sessions that are still active but do not have the specified applications running in them. You may think, is this not similar to a lingering session? The answer is no, so how can a session get into this app state? Consider the following scenario; the user launches a published application, the initial process starts up and the application works as expected, sometime during the session a secondary process is initialized and the primary session is terminated. It is at this stage the session is still active but its state is said to be application not running because the initial process has terminated. This could be normal behaviour in some applications.
This state can useful when troubleshooting application logoff termination issues as it means that some process has not been terminated. To put some context behind read my colleague’s kb article CTX133328.
Update: this behaviour may also be exhibited when publishing explorer.exe you can read more about possible workaround CTX133835
In addition to the App Centre Console the app state can be found in the registry and by using the XenApp PowerShell command (where n = session id).
APPSTATE NONE = 0
APPSTATE ACTIVE = 1
APPSTATE PRELAUNCHED = 2
APPSTATE LINGERING = 3
APPSTATE NOAPPS = 4
PowerShell Get-XASession -session <strong>N </strong>
View Sessions Running on an RD Session Host Server
A Field Guide to XenApp 6.5 Session Pre-Launch
XenApp 6.5 AppCenter Console Displays Application Status Application Not Running
Published Explorer not Visible in AppCenter Console