STATUS_CTX_WINSTATION_NOT_FOUND (0xC00A0015) Fix
Shows up when Remote Desktop can't find the session you're trying to connect to. Usually after a disconnect or reboot.
When This Error Hits
You're connecting to a Windows Server (2016, 2019, or 2022) or maybe a Windows 10/11 Pro machine via Remote Desktop. You type the computer name, enter credentials, and boom — the RDP client shows a dialog box with STATUS_CTX_WINSTATION_NOT_FOUND and the code 0xC00A0015. The connection fails instantly.
This usually happens after you've disconnected from a session instead of logging off. Maybe the server rebooted while you were disconnected. Or another admin kicked your session. The key trigger: the session ID or name that the RDP client remembered no longer exists on the target machine.
What's Actually Going On
Remote Desktop keeps track of active sessions by ID and name. When you disconnect, your session stays alive — it's still there, just inactive. The RDP client remembers that session. But if something deletes that session (like a reboot, a forced logoff, or a session timeout policy), the next time you try to reconnect, the client sends a request for a session that no longer exists. The server says "I don't have that session" and throws 0xC00A0015.
The fix is simple: you need to reset the session on the server side or force the client to create a new session instead of trying to reconnect to the old one.
The Fix: Step by Step
You'll need remote access to the server — either via a different admin account or from the console. If you're locked out entirely, you'll need physical or out-of-band access (like iDRAC, iLO, or IPMI).
-
Open a command prompt on the server.
If you have another admin account that can RDP in, use that. Otherwise, log in at the console. Runcmdas Administrator (right-click, Run as administrator). -
List all active sessions.
Type this command:
You'll see a table with columns: SESSIONNAME, USERNAME, ID, STATE, TYPE, and DEVICE. Look for your stuck session. It might show asqwinstardp-tcp#with a state ofDisc(disconnected). Note the ID number.Expected output example:
SESSIONNAME USERNAME ID STATE TYPE DEVICE console admin 0 Active console rdp-tcp#0 jdoe 1 Disc rdp rdp-tcp#1 smith 2 Active rdp -
Reset the stuck session.
Take the ID of the disconnected session (in the example, ID 1). Run:
Replacerwinsta 11with the actual ID. This forcefully logs off that session. You'll see no confirmation — it just runs.After running rwinsta, run
qwinstaagain. That session should be gone from the list. -
Now try RDP again.
From your client machine, open Remote Desktop (mstsc), type the server name, and connect. This time it should create a fresh session. The error should be gone.
Alternative: Force a New Session Without Admin Console
If you can't get to the server console or another admin account, you can try this from the client side — but it only works if the server still has available RDP listener slots.
- Close any open RDP windows.
- Open the RDP client. In the Computer field, type the server name.
- Go to the Experience tab. Uncheck Persistent bitmap caching. This forces the client to discard any cached session info.
- Click Connect. When prompted, use the same username and password. This should create a new session.
- If it still fails with the same error, the server's listener is stuck. You'll need the
rwinstaapproach above.
Still Failing? Check These
- RDP listener service might be hung. On the server, open Services (win+r, type
services.msc). Find Remote Desktop Services (TermService). Restart it. This kills all active sessions, so only do this if you're sure no one else is working. - Check if the server has reached its connection limit. Run
qwinstaagain. If you see many sessions inDiscstate, runrwinstaon each inactive one to free up slots. - Group Policy or local policy might enforce a max session limit. On the server, run
gpedit.msc, go to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections. Check Restrict Remote Desktop Services users to a single Remote Desktop Services session and Limit number of connections. If these are set too low, increase them or disable them. - Corrupt RDP cache on your client. Delete the
%USERPROFILE%\AppData\Local\Microsoft\Terminal Server Client\cachefolder. Then try connecting again. That wipes the local bitmap cache.
In my experience, 9 times out of 10, the rwinsta command fixes it instantly. Start there. Don't overthink it.
Was this solution helpful?