You cannot completely disconnect a Terminal Server connection (216783)



The information in this article applies to:

  • 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
  • Microsoft Windows Server 2003, Enterprise Edition

This article was previously published under Q216783
Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

SYMPTOMS

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.

CAUSE

This issue can occur because Terminal Server implements a Keep Alive mechanism.

RESOLUTION

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

Windows NT 4.0 Terminal Server Edition

To work around this issue, follow these steps:
  1. Apply the latest service pack for Windows NT 4.0, Terminal Server Edition.
  2. 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

  3. In the Terminal Server Connection Configuration tool, double-click rdp-tcp, and then click Advanced.
  4. 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 Server

To work around this issue, follow these steps:
  1. 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

  2. Open Terminal Services Configuration in Administrative Tools, double-click RDP-Tcp in the Connections folder, and then click the Sessions tab.
  3. Click to select Override user settings and make sure that Disconnect from session is selected and then click OK.

Windows XP and Windows Server 2003

To work around this issue, follow these steps:
  1. Click Start, click Run, type gpedit.msc, and then click OK.
  2. Expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Terminal Services.
  3. In the right pane, double-click Keep-Alive Connections.
  4. Click Enabled, and then click OK.
  5. Close Group Policy Object Editor, click OK, and then quit Active Directory Users and Computers.

Modification Type:MajorLast Reviewed:3/3/2005
Keywords:kbnetwork kbprb kbui KB216783