You cannot completely disconnect a Terminal Server connection
This article was previously published under Q216783
After a Terminal Server client loses the connection to a Terminal Server, the session on the Terminal Server may not transition to a disconnected state, instead, it may remain active even though the client is physically disconnected from the Terminal Server. If the client logs back in to the same Terminal Server, a totally new session may be established, and the original session may still remain active.
This issue can occur because Terminal Server implements a Keep Alive mechanism.
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
Windows NT 4.0 Terminal Server EditionTo work around this issue, follow these steps:
- Apply the latest service pack for Windows NT 4.0, Terminal Server Edition.
- Use Registry Editor to add a DWORD value, KeepAliveEnable, with a Positive numeric value of 1 (which represents 1 minute) to the following registry key:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
- In the Terminal Server Connection Configuration tool, double-click rdp-tcp, and then click Advanced.
- On the On a broken or timed-out connection, <connect action> the session line, click to clear the inherit user config option. Click Disconnect on On a broken or timed-out connection, <connect action> the session, and then click OK.
Windows 2000 ServerTo work around this issue, follow these steps:
- Use Registry Editor to add a DWORD value, KeepAliveEnable, with a positive numeric value of 1 (which represents Enable) to the following registry key:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
- Open Terminal Services Configuration in Administrative Tools, double-click RDP-Tcp in the Connections folder, and then click the Sessions tab.
- Click to select Override user settings and make sure that Disconnect from session is selected and then click OK.
Windows XP and Windows Server 2003To work around this issue, follow these steps:
- Click Start, click Run, type gpedit.msc, and then click OK.
- Expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Terminal Services.
- In the right pane, double-click Keep-Alive Connections.
- Click Enabled, and then click OK.
- Close Group Policy Object Editor, click OK, and then quit Active Directory Users and Computers.
terminalsvr terminal KeepAliveEnable KeepAliveInterval session disconnect session alive
Article ID: 216783 - Last Review: 02/27/2007 00:08:53 - Revision: 6.4
Microsoft Windows NT Server 4.0, Terminal Server Edition, Microsoft Windows 2000 Server, Microsoft Windows XP Professional, Microsoft Windows XP Home Edition, Microsoft Windows Server 2003, Standard Edition (32-bit x86), Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
- kbnetwork kbprb kbui KB216783