sodcalculator

10 Tech How-To

Fix Remote Session Was Disconnected Error in Windows 11

Guide 10-51576 · Updated · Step by step

The “Remote session was disconnected” error in Windows 11 typically appears when the Remote Desktop Connection (RDC) client loses its link to the host computer, often due to network instability, an incorrect encryption setting, or a policy limit on disconnected sessions. You can usually fix it by adjusting the Remote Desktop connection timeout settings, disabling Network Level Authentication (NLA) temporarily, or checking the host’s power and sleep settings.

What Causes This Error

This error is not a single fault but a symptom of several possible issues. The most common triggers are:

  • Idle timeout: The host machine is configured to disconnect inactive sessions after a set period, usually for security or resource management.
  • Network Level Authentication (NLA) mismatch: If the client and host disagree on NLA requirements, the connection can drop right after the login screen appears.
  • Network instability: Wi-Fi interference, VPN drops, or aggressive power-saving on the network adapter can sever the connection.
  • Insufficient permissions or group policy: Local security policies on the host may limit session duration or disallow reconnections.
  • Corrupted RDP cache: Stale cached credentials or display settings on the client side can cause immediate disconnects.

Quick Fixes to Try First

Before diving into deeper settings, try these two-minute checks, as they resolve a surprising number of cases:

  1. Restart both machines: A simple reboot clears temporary network stack issues on both the client and the host.
  2. Check the host’s network connection: Ensure the remote PC is not on a metered connection or in sleep mode. Wake it by sending a magic packet or physically pressing a key if possible.
  3. Ping the host from the client: Open Command Prompt and type ping [host IP or name]. If you get timeouts or high latency (above 100ms), the network path is the problem.
  4. Use the IP address instead of the computer name: Sometimes DNS resolution fails, so connecting directly to the IP (e.g., 192.168.1.10) bypasses that issue.

Adjusting Session Timeout Settings

If the error appears after you have been idle for a while, the host’s Remote Desktop Session Host (RDSH) settings are likely cutting you off. To change this:

  1. On the host machine, press Win + R, type gpedit.msc (Group Policy Editor, available on Pro and Enterprise editions) and press Enter.
  2. Navigate to Computer Configuration → Administrative Templates → Windows Components → Remote Desktop Services → Remote Desktop Session Host → Session Time Limits.
  3. Double-click “Set time limit for active but idle Remote Desktop Services sessions”.
  4. Select Enabled and choose Never from the drop-down (or a longer period like 8 hours). Click OK.
  5. Also check “Set time limit for disconnected sessions” and set it to Never or a long duration.
  6. Open Command Prompt as administrator and run gpupdate /force to apply the changes.

Note: If you are on Windows 11 Home, gpedit.msc is not available. You can edit the registry instead, but the group policy method is safer and easier to revert.

Disabling Network Level Authentication (NLA)

NLA is a security feature that requires the client to authenticate before a full session is established. While it is recommended, a mismatch between the client’s RDP version and the host’s NLA setting can cause an immediate disconnect after the credentials are entered. To test this:

  1. On the host, open Settings → System → Remote Desktop.
  2. Toggle on Remote Desktop if it is off.
  3. Click Advanced settings and uncheck “Require computers to use Network Level Authentication to connect”.
  4. Try connecting again. If it works, the issue is with the NLA handshake. You can re-enable it later after updating the client or host.

Keep in mind that disabling NLA reduces security, so only do this as a diagnostic step and re-enable it after you have confirmed the connection works with other fixes.

Checking Power and Network Adapter Settings

Windows 11 aggressively saves power on laptops and some desktops, which can disable the network adapter or put the system to sleep during a remote session. To prevent this:

  • Go to Settings → System → Power & battery (on laptops) or Control Panel → Power Options (on desktops).
  • Set the Sleep setting to Never when plugged in.
  • Open Device Manager, expand Network adapters, right-click your Wi-Fi or Ethernet adapter, and select Properties.
  • Go to the Power Management tab and uncheck “Allow the computer to turn off this device to save power”.

Clearing the RDP Cache and Credentials

Corrupted cached files on the client can also cause disconnects. Clearing them is safe and often fixes persistent issues:

  1. On the client machine, open File Explorer and navigate to C:\Users\[YourUsername]\AppData\Local\Microsoft\Terminal Server Client.
  2. Delete the Cache folder contents (do not delete the folder itself).
  3. Open Credential Manager (search for it in Start), go to Windows Credentials, and remove any entries under Remote Desktop Credentials that match the host’s address.
  4. Reconnect. You will be prompted for the password again, which is normal.

Frequently Asked Questions

Why does the error say “The connection was lost” instead of “disconnected”?
That message usually indicates a network interruption during the session, not a policy timeout. Check your Wi-Fi signal strength, try a wired connection, and disable any VPN that might be dropping packets.

Will changing the timeout policy affect other users?
Yes, the group policy change applies to all users who connect to that host. If you only want to change it for yourself, you need to use the Remote Desktop Session Host configuration in Server Manager (on Windows Server) or create a separate policy for your user account.

Can I reconnect to a session that was disconnected?
Yes, by default Windows keeps the session alive for a short period. When you reconnect, you will see a message asking if you want to reconnect to the existing session. If the session was terminated (not just disconnected), you will get a new one.

Is it safe to disable NLA permanently?
It is not recommended. NLA prevents brute-force attacks by requiring authentication before the login screen is shown. Only disable it temporarily for troubleshooting, and re-enable it once the connection works.

Why does the error happen on my home network but not at work?
Home routers often have aggressive idle timeouts or use NAT that breaks long-lived RDP connections. Try setting a static IP for the host and enabling port forwarding (if needed), or use a VPN to keep the connection alive.

Does Windows 11 Home support Remote Desktop?
Windows 11 Home can act as a client (connecting to other machines), but it cannot act as a host (being connected to) using the built-in Remote Desktop. For that, you need Pro, Enterprise, or a third-party tool.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →