[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 382
  • Last Modified:

Detecting Citrix using .NET

How do you detect a Citrix Session ID using .Net?
1 Solution
Paste from MSDN:

Monitoring Session Connections and Disconnections
For the service-side application to monitor session connections and disconnections, you must register it with Terminal Services in the following manner. First, you must store the name of the virtual channel server application in the registry. Add a subkey under the following location.

The subkey can have any name. It must have a REG_SZ value, Name, that contains the symbolic name of the application.

Name = AddinName
The maximum length of both the subkey and the value of Name is 99 characters.

It must also have a REG_DWORD value that indicates the type of server application.

Type = AddinType
AddinType must be the following value.

Value Meaning
3 User-mode application, session space.

Registration of the server application takes effect only in sessions created after the registration was performed.

Each registered server application can create two event objects that are signaled when a client connects or disconnects. The names of these event objects are Reconnect and Disconnect, respectively, and have the following format:

AddinName is the string specified in the Name value of the registry subkey under which the server application is registered. SessionId is the session identifier of a client session.

The server application must create these event objects in an unsignaled state. When a client application connects or disconnects from a session, Terminal Services sets the appropriate event to the signaled state. If the user application must monitor these event objects again, it must reset them to the unsignaled state.
<end paste>

the URL: http://msdn.microsoft.com/library/psdk/termserv/wtsapi_8vhv.htm

see also: TEvent in syncobjs which is a wrapper around win32 event objects.

hope this helps

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now