3

I'd like to know how an application running in the user session is affected by the user's RDP session being disconnected, aborted, shutdown, or whatever actions could be invoked on a RDP session.

Will the application still be running, or shutdown regularly, or aborted? What about any network connections used by that application, e.g. a connection to a database server?

3
  • 1
    Homework question? Or do you have a real-life use case that you choose to keep mysterious? Please avoid asking generic, open questions like this and instead focus on the particular situation / problem that you are facing. Jan 26, 2016 at 12:09
  • 2
    It's not a homework question, it's just that I have to deal with remote desktop services, but I don't have the required experience and resources to test it myself. The actual question is about what happens to a running application when a RDP session "ends" somehow. Updated question to better reflect my problem.
    – MicSim
    Jan 26, 2016 at 12:22
  • 2
    This also depends to some degree on the application in question. Not all applications handle remote sessions properly. Jan 26, 2016 at 13:52

1 Answer 1

8

The answer is:https://technet.microsoft.com/en-us/library/cc754272.aspx

By default, Remote Desktop Services allows users to disconnect from a remote session without logging off and ending the session. When a session is in a disconnected state, running programs are kept active even though the user is no longer actively connected.

To understand Remote Desktop Sessions

When a user logs on to a Remote Desktop Services–enabled computer, a session is started for the user. Each session is identified by a unique session ID. Because each logon to a Remote Desktop Connection (RDC) client receives a separate session ID, the user-experience is similar to being logged on to multiple computers at the same time; for example, an office computer and a home computer.

Each remote desktop session is associated with an interactive window station. The only supported window station name for an interactive window station is "WinSta0"; therefore each session is associated with its own "WinSta0" window station. There are three standard desktops for each window station: the Winlogon desktop, the screen saver desktop, and the interactive desktop.

The user associated with the interactive window station for a session is known as the interactive user. On a Remote Desktop Connection (RDC) client there can be multiple interactive users in addition to the interactive user on the Remote Desktop Services console. To retrieve the identifier of the session currently attached to the console, use the WTSGetActiveConsoleSessionId function.

When a user logs off from a Remote Desktop Connection (RDC) client, the session that the client has on the Remote Desktop Session Host (RD Session Host) server (formerly known as a terminal server) is deleted and the window stations and desktops associated with that session are removed. However, because the Remote Desktop Services console session is never deleted, the window stations associated with the console session are not deleted. This affects how applications behave in a Remote Desktop Services environment when they are configured to run in the security context of the interactive user, also known as the "RunAs Interactive User" object activation mode.

0

Not the answer you're looking for? Browse other questions tagged .