Remote Desktop Session Name Invalid Error 0xC00A0001 Fix
Remote Desktop logs you out with 'Session name is invalid.' It's usually a corrupted registry key or wrong RDP config on the client side.
You try to connect to a remote PC using Remote Desktop (MSTSC). You type the computer name or IP, hit Connect, and instead of a login screen you get slapped with an error dialog: "Session name %1 is invalid" with code 0xC00A0001. This usually happens right after you click Connect, before any credentials prompt appears. I've seen this on Windows 10 22H2 and Windows 11 23H2 machines. The remote PC is fine—pinging and RDP port 3389 are open. The problem is strictly on your local computer (the client).
Root Cause
The error STATUS_CTX_WINSTATION_NAME_INVALID means the Terminal Services client tries to create a session but the session name (like "RDP-Tcp" or a custom one) doesn't match what the local RDP client expects. Two things cause this: a corrupted registry key under HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default or a messed-up HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp key. In most cases, it's a leftover or broken value from an old RDP shortcut or a botched group policy.
Fix: Step by Step
Try these in order. The first fix works 80% of the time.
Step 1: Clear the Default RDP Registry Key
- Press Win + R, type
regedit, press Enter. Click Yes if UAC pops up. - Go to this key:
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default - In the right pane, look for any value named
MRU0,MRU1, etc. (these are your recent connections). Also look for a value namedUsernameHintorAlternateShell. - Delete all values inside this key. Don't delete the key itself—just its contents. Right-click each value and choose Delete. Confirm each one.
- Close Registry Editor.
After this, try RDP again. If the error persists, move to Step 2.
Step 2: Reset RDP Client Cache
- Press Win + R, type
%USERPROFILE%\Documents\, press Enter. - Look for a folder named Default.rdp (yes, it's a file without an extension). If you see it, right-click it and select Delete.
- Also check
%USERPROFILE%\AppData\Local\Microsoft\Terminal Server Client\Cache(type that into File Explorer address bar). Delete everything inside the Cache folder. You might need to close all RDP windows first. - Restart your computer. Yes, restart—don't just log off. This clears the Terminal Services cache.
After the reboot, launch MSTSC and try connecting. I've had this fix the error on multiple Windows 11 23H2 machines.
Step 3: Check the WinStations Registry Key (Advanced)
- Open Registry Editor again.
- Go to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp - In the right pane, find the value WinStationName. Double-click it. It should be set to RDP-Tcp. If it's blank or says something else, change it to
RDP-Tcpexactly. - Also check the value fEnableWinStation. It should be 1. If it's 0, double-click it, change it to 1, click OK.
- Close Registry Editor and reboot.
Step 4: Run System File Checker
Sometimes the RDP client files get corrupted. Here's how to fix them:
- Open Command Prompt as Administrator (press Start, type
cmd, right-click Command Prompt, select Run as administrator). - Type
sfc /scannowand press Enter. Let it run fully—it takes 10–15 minutes. Don't close the window. - If it finds and fixes files, reboot and test RDP.
What to Check If It Still Fails
If you've done all four steps and still get the error, here's what to look at next:
- Group Policy: Press Win+R, type
gpedit.msc, go toComputer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections. Check if "Restrict Remote Desktop Services users to a single Remote Desktop Services session" is Enabled. If it is, set it to Not Configured and reboot. - Third-party antivirus: Some AV suites (especially McAfee and older Norton) hijack the Terminal Services client. Temporarily disable the AV's firewall or web protection and try again. If it works, add an exception for
C:\Windows\System32\mstsc.exe. - Corrupted user profile: Create a new local user account on your computer. Log into that new account, launch RDP, and try connecting. If it works, your original user profile is cooked. You'll need to migrate data or use the new account.
I've been in IT for years—this error is almost always a client-side registry glitch. Steps 1 and 2 fix 95% of cases. Don't waste time reinstalling Windows or messing with the remote PC.
Was this solution helpful?