大网数据广告活动
远程桌面与会话

RemoteApp sessions are disconnected

· 52CE 我爱测

Resolves an issue where RemoteApp sessions are disconnected when all RemoteApp windows and user-launched notification area icons are closed.

This article provides help to solve an issue where RemoteApp sessions are disconnected when all RemoteApp windows and user-launched notification area icons are closed.

Original KB number:   2345390

Summary

When a user launches a Remote Desktop Services or Terminal Services RemoteApp, a Remote Desktop session is created in which the application runs. Any subsequent RemoteApps that are launched from the same client before the session is logged off will run in the same session. Additionally, any notification area (system tray) icons that are launched by the user will also run in the same session.

When all active application windows and all user-launched notification area icons are closed, the session remains active for 20 more seconds. This allows time for the user to launch another application, and for applications to display final messages or perform other closing tasks. If another application or system tray icon isn't launched within that time, the RDP session is disconnected.

More information

Leaving the session in a disconnected state allows subsequent RemoteApps to launch much more quickly. When a new RemoteApp is launched the session is reconnected instead of incurring the overhead of starting a new one.

By default disconnected RemoteApp sessions will remain in a disconnected state indefinitely. This behavior can be modified by a new Group Policy setting introduced in Windows Server 2008, Set time limit for logoff of RemoteApp sessions. This setting is located in Group Policy under both Computer Configuration and User Configuration:

  • Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits
  • User Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits

To enable and configure the policy setting:

  1. Log on to the terminal server as an administrator.
  2. Start the Local Group Policy Editor. To do this, click Start, click Run, type gpedit.msc, and then click OK.
  3. Locate the appropriate node under Computer Configuration or User Configuration as shown above.
  4. In the right pane of the Local Group Policy Editor, double-click Set time limit for logoff of RemoteApp sessions.
  5. Click Enabled.
  6. In the RemoteApp session logoff delay list, select the desired time for logoff delay, and then click OK.
  7. At a command prompt, type gpupdate and press ENTER to force the policy to refresh immediately on the local computer.

After the policy setting is enabled, disconnected RemoteApp sessions will be logged off after the configured time delay. If other settings that control logging off disconnected Remote Desktop or Terminal Services sessions (not just RemoteApp sessions) conflict with the above setting, then the policy configured for the shortest time period will take effect. For example, if the Set time limit for disconnected sessions policy setting is configured for a shorter time period than Set time limit for logoff of RemoteApp sessions, the former will take effect.

Reference

For more information, see Policy CSP - ADMX_TerminalServer.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- Supported versions of Windows Server · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。