Summary
This document provides details about the design and functionality of the Workspace Control feature as implemented in Citrix Presentation Server versions 4.0 and 4.5.
Target Audience:
Application developers, Citrix server administrators, and help desk personnel.
This document consists of three sections:
Workspace Control Overview
How it Works
Limitations
This feature is intended to give the user a better experience when connecting to a server running Presentation Server while enhancing the user workspace experience by easily and quickly allowing an end-user to move between client devices and automatically connect to all of their sessions (whether in a disconnected or active state). This can be during a logon or manually at anytime using the Reconnect/Disconnect All buttons.
This feature provides the user the capability of quickly disconnecting and reconnecting to their disconnected or both disconnected and active applications.
After a user authenticates, the client checks if Reconnect at Log on is enabled for this user. If so, the client contacts the server farm to get a list of applications that run in this user’s disconnected/active sessions and tries to launch them. This allows users to reconnect all their sessions. Users can also disconnect all their active sessions and reconnect to them all.
Note: The reconnect function is supported in Program Neighborhood Agent and Web Interface, but not in Program Neighborhood Classic.
A reconnect can happen automatically after users log on to Program Neighborhood Agent and Web Interface, or users can reconnect by using the Reconnect button in Program Neighborhood Agent and Web Interface.
There are generally three user cases for the reconnect button:
• When users don’t have an auto-reconnect session at logon, they can still click the Reconnect button to manually reconnect to the sessions.
• When users disconnect from one or two applications in a session and then want those applications back, they can reconnect using the reconnect button.
• A user is working in a session, then goes to a different location (without disconnecting first). This will pull the current session over and use the Reconnect button to quickly reconnect.
For the user interface of Program Neighborhood Agent and Web Interface, the following menu/button options are available:
Log off – Logoff active user sessions on current client device and return Program Neighborhood Agent/Web Interface to logon screen.
Disconnect – Disconnect active user sessions on current client device and return Program Neighborhood Agent/Web Interface to logon screen
Reconnect – Reconnect to all disconnected/active user sessions
Close – Terminate the Program Neighborhood Agent executable, leaves sessions opens. Web Interface would not have this button, instead, the Close functionality is from the “X” provided by the Browser.
Administrative configuration
From Program Neighborhood Agent and Web Interface Administrative console the administrator may specify the Web server’s default behavior:
Reconnect at Log on (checkbox, on by default)
Connect to Disconnected Session Only (radio button)
Connect to Active and Disconnected Sessions (radio button, this is on by default)
Reconnect Button (checkbox, on by default)
Connect to Disconnected Session Only (radio button)
Connect to Active and Disconnected Sessions (radio button, this is on by default)
Web server administrators may also configure the default logoff behavior.
Log off Button (Web Interface only)
Log off Web Interface and sessions (radio button, on by default)
Log off Web Interface but do NOT logoff session (radio button)
To give maximum flexibility to administrators and users, administrators can allow certain settings that users can customize.
For example, from the Program Neighborhood Agent and Web Interface Administrative console the administrator may allow the user to edit the following:
Reconnect at Log on
Reconnect Button
Log off Button (Web Interface only)
User configuration
Users have the option to customize the reconnect setting (if enabled by the administrator). For Program Neighborhood Agent and Web Interface the user may elect to configure:
Reconnect at Log on (checkbox, on by default)
Connect to Disconnected Session Only (radio button)
Connect to Active and Disconnected Sessions (radio button, this is on by default)
Reconnect Button (checkbox, on by default)
Connect to Disconnected Session Only (radio button)
Connect to Active and Disconnected Sessions (radio button, this is on by default)
Log off Button (Web Interface only)
Log off Web Interface and sessions (radio button, on by default)
Log off Web Interface, but do NOT logoff session (radio button)
These settings are applied to the device where the user configures them. If the user moves to use another device, they need to configure them again with the same or different values.
Supported Clients
The Workspace Control feature is supported by Win32, WinCE, Linux, and Java clients. Support for this feature with the Java client is provided entirely through the Web Interface.
Multi-farm support
Since the Web Interface supports multi-farm, this feature is supported across server farms.
Anonymous users
If the login method is anonymous and the Web Interface is the client, then:
The Reconnect button is disabled because all anonymous connections are reset during logoff or disconnect.
Disconnect is disabled because there will be no disconnected anonymous user sessions.
Logoff is enabled, but anonymous sessions will only be logged off if the XML Service trusts the Web server credentials.
If the logon method is anonymous and Program Neighborhood Agent is the client, then:
The Reconnect function is disabled because all anonymous connections are reset during logoff or disconnect.
Disconnect is disabled because there will be no disconnected anonymous user sessions.
Logoff is enabled, and anonymous user sessions can be logged off from client side.
If authenticated users run anonymous published applications and the Web Interface is the client, the Reconnect, Logoff, and Disconnect buttons are all enabled. However, the following are true:
Anonymous sessions will only be logged off if the XML Service trusts the Web Interface credentials.
Upon disconnect, anonymous sessions will be reset.
Reconnect to anonymous published apps is not supported. The Client will only reconnect to non-anonymous published applications.
If authenticated users run anonymous published applications and Program Neighborhood Agent is the client, the Reconnect, Logoff, and Disconnect buttons are all enabled. However, the following are true:
Anonymous sessions can be logged off from Program Neighborhood Agent client side.
Upon disconnect, anonymous sessions will be reset.
Reconnect to anonymous published apps is not. The Client will only reconnect to non-anonymous published applications.
Components
The Workspace Control functionality uses the following Citrix Presentation Server components:
Web Interface/Advanced Access Control
Program Neighborhood Agent
XML/Web Interface Protocol
XML Service
IMA
Management Console
Functionality
The <RequestReconnectUserSessions>, <RequestLogoffUserSessions> and <RequestDisconnectUserSessions> XML Requests that come from the Web server are first parsed at the XML Service, then the appropriate functions are called into the IMAService through MFRPC. The MFRPC subsystem first checks for valid user credentials if it’s explicitly specified, or checks the Trust Mode if it is smart card or pass-through authenticated user. If the user is allowed access, MFRPC calls into the MFServer subsystem, which handles all of the Workspace Control related functions.
The following diagram illustrates the sequence of events when a user attempts to reconnect to active and/or disconnected sessions:

Reconnect to active sessions
The MFServer subsystem processes the <RequestReconnectSessionData> request using the following steps:
1. Is Reconnect to Disconnected session desired? If not, go to step 2.
If Yes, the IMA server queries a list of disconnected sessions from the dynamic store Disc_Sessions table, based on the search criteria below.
2. Is Reconnect to Active session desired? If not, prepare response to return to client. If Yes, continue to step 3.
3. The server queries a list of active sessions from the dynamic store Conn_Sessions table based on search criteria below, and issues WinStationDisconnect() for each of them (including sessions running on other servers in the farm). It then returns this list of sessions plus any sessions queried from step 1.
The following search criteria are used in searching IMA Sessions tables:
1. Retrieve all the sessions that belong to this user.
2. Ignore any session that does not match the specified ServerType and ClientType (ICA or RDP, and so on).
3. Ignore any session that is running in pass-through mode.
4. Ignore any session that has no LaunchedBrowserName.
5. If searching for active sessions, ignore any session that has the same <ClientName>, preventing disconnects and reconnects of any active sessions that are running from the user’s current client device.
After the above five search steps, the sessions remaining, are those to which the client can reconnect. This list is then returned to the client.
Disconnect active sessions
When a Disconnect request is received by a server running Citrix Presentation Server, for example Server A, after searching sessions based on the steps listed above, Server A will have all the active user sessions that satisfy the disconnect requirement. For each active session running on other servers, for example Server B, Server A sends Server B an IMA event, asking Server B to issue WinStationDisconnect() to that session and return the result.
Session Sharing Support
In the case of Session Sharing where multiple applications run in the same session, the <HostID> and <SessionID> field in the IMA session table record uniquely identifies a session. A server only needs to return one application name in this session to the client. This saves the client the effort of trying to re-launch all the applications in one session, or the client the effort of trying to sort out which applications are indeed in one session. The AppName returned will be the InitialBrowserName which is the first application launched in that session.
MFRPC Subsystem
This is the interface between the IMA service and the XML service. Some of the methods involved in Workspace Control are:
ReconnectUserSessions
DisconnectUserSessions
LogoffUserSessions
MF Server Subsystem
This subsystem is responsible for handling workspace control reconnect, logoff, disconnect requests. It also resolves application addresses for application resolution requests.
ReconnectUserSessions
DisconnectUserSessions
LogoffUserSessions
ResolveSession
These are a few limitations with Workspace Control as follows.
Pass-through mode
The Workspace Control Reconnect feature is not available if the Program Neighborhood Agent or the Web Interface is running in a pass-through session. To make this feature available, users need to run Program Neighborhood Agent or Web Interface from the client device.
For example, the following scenarios are supported:
1. Program Neighborhood Agent and Web Interface running on the client, the Program Neighborhood Agent/Web Interface provides WorkSpace Control functionality.
2. Client computers with Program Neighborhood available and running Internet Explorer locally, Internet Explorer connects to the Web Interface to provide Workspace control.
3. WYSE Winterm running Internet Explorer locally, Internet Explorer connects to Web Interface to provide Workspace control
However, if the Program Neighborhood Agent or Internet Explorer is running on the server running Citrix Presentation Server in a Pass-through session, then the Workspace Control feature will be disabled, meaning that the user cannot reconnect their user sessions from the published Program Neighborhood Agent or Internet Explorer in pass-through mode.
Direct Server Connections
Users can make a direct custom server connection with Program Neighborhood client. In this case, the session appears in IMA session table with a blank AppName. It’s impossible for Program Neighborhood Agent or Web Interface Client to reconnect to this session because there is no valid Application name associated with this session.
Because this feature is available only on the Program Neighborhood Agent and the Web Interface Client, this feature does not support custom server connections, meaning that it will not disconnect, logoff, reconnect sessions without an AppName.
WinCE devices:
Some WinCE devices that the Web Interface has to support cannot support multiple instances of the ICA client, or if they can, do not offer any way to switch between them. This is only a problem if a user switches clients. Also, WinCE platforms do not have access to the settings page. Therefore, users cannot disable the feature from any WinCE client. One possible solution is to set up a dedicated Web Interface site for all WinCE clients with the feature disabled. However, the use-case is rare, and the user will have to manage the reconnect from a lesser capable device in any way that the client supports.
Reconnect Issues
The following behavior may be seen with the disconnect-to-reconnect concept for active sessions. (To connect to active session, first disconnect them, and try to reconnect).
1. If the administrator has chosen to disallow disconnected sessions on a server running Citrix Presentation Server, the current mechanism will cause them to be terminated.
2. If Seamless Session Sharing is disabled, users can run multiple copies of the same published application on the same server. When a user tries to reconnect, Winlogon will display a dialog listing those disconnected session and let the user choose which one to reconnect.