Why this is better:
Licensing tokens can become corrupted after multiple connections to different servers. Cleaning the cache instantly resolves 0x904 when it’s a false positive error.
Error code 0x904 is not a hardware failure or a simple network glitch. It’s a security negotiation breakdown, and fixing it requires targeted changes to CredSSP, Group Policy, or the RDP security layer.
By following the better methods above—Registry tweaks, clearing caches, adjusting security layers—you’ll resolve 0x904 in under ten minutes, while maintaining as much security as your environment allows.
Final recommendation: Always try the CredSSP AllowEncryptionOracle = 2 registry fix first. It works for 80% of users. If not, move to Group Policy, and as a last resort, downgrade to RDP Security Layer.
Now you’re equipped to handle i remote desktop connection error code 0x904 better than 99% of IT forums out there.
Need advanced RDP troubleshooting? Check Microsoft’s official RDP licensing guide or your Windows Server event logs (Applications and Services → Microsoft → Windows → TerminalServices-LocalSessionManager).
Remote Desktop error code (often accompanied by extended error code 0x7)
typically indicates a network connection issue, such as insufficient bandwidth, packet loss, or a mismatch in encryption ciphers
. It frequently occurs after Windows 11 updates or when connecting over a VPN. Core Troubleshooting Steps Connect via IP Address
: Instead of using the computer's hostname, try entering its direct IP address in the Remote Desktop Connection box. This bypasses potential DNS resolution bugs. Use the Microsoft Store App : The modern Microsoft Remote Desktop app from the Microsoft Store
uses different networking code than the built-in legacy client ( ) and often bypasses the 0x904 error. Renew Expired RDP Certificates
: One of the most common "hidden" causes is an expired self-signed certificate on the host machine. On the host, press certlm.msc , and navigate to Remote Desktop > Certificates
Check the expiration date; if expired, delete the certificate. Restart the Remote Desktop Services services.msc to force Windows to generate a new one. Fix Azure VM Certificate Corruption
: If using an Azure Virtual Machine, certificate store corruption is a known cause. Use the Azure Portal's "Run Command" to rename the MachineKeys folder with the following PowerShell: i remote desktop connection error code 0x904 better
Rename-Item -path "C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys" -NewName "MachineKeys_old" Then reboot the server. www.remoteaccesspcdesktop.com Advanced Network & Registry Fixes Unable to RDP into some Windows Servers - Error code: 0x904
Remote Desktop error code is often a result of expired or corrupt certificates unstable network connections Windows 11 compatibility bugs www.remoteaccesspcdesktop.com Most Effective Fixes Renew RDP Certificates (Primary Solution)
: This error is frequently caused by expired self-signed certificates on the target server. Log into the target server directly. Open the Certificates MMC snap-in ( certlm.msc Remote Desktop Certificates the expired certificate. Restart the service via Command Prompt (Admin): restart-service termserv -force . Windows will automatically generate a fresh certificate. Fix Certificate Corruption (Azure VMs)
: If your target is an Azure Virtual Machine, the certificate store might be corrupt. In the Azure Portal, use the Run Command tool to run this PowerShell script:
Rename-Item -path "C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys" -NewName "MachineKeys_old" the server to reset the store. Windows 11 Workarounds : Windows 11 (builds 22H2 and later) has known RDP bugs. Use the IP Address : Instead of using the computer's hostname (e.g., ), type in its direct IP address (e.g., 192.168.1.50 Switch Apps Remote Desktop app from the Microsoft Store instead of the built-in "Remote Desktop Connection" (
), as it uses a different networking stack that often bypasses this error. Network and Firewall Stability is open on the target computer's firewall.
If using a VPN, a slow or unstable connection can trigger 0x904. Reconnect to your VPN or try a more stable internet source. www.remoteaccesspcdesktop.com Are you connecting to a local office computer Azure Virtual Machine Fix Remote Desktop Error Code 0x904: 4 Working Solutions
Remote Desktop error code 0x904 (often with extended error 0x7) typically signals an unstable network connection, expired security certificates, or compatibility issues in Windows 11. Top Recommended Fixes
Renew Expired RDP Certificates: This is a primary cause when some servers connect and others don't.
Open the Certificate Manager (certlm.msc) on the remote server. Go to Remote Desktop > Certificates. If the certificate is expired, delete it.
Open Command Prompt as admin and run: restart-service termserv -force to generate a new one.
Connect via IP Address: Windows 11 updates sometimes break hostname resolution for RDP. Use the server's IP address (e.g., 192.168.1.50) instead of its computer name.
Fix Corrupt Azure VM Certificates: If you are using an Azure VM, a corrupt certificate store can cause this error. Check remote settings
In the Azure Portal, use Run command to rename the MachineKeys folder with this PowerShell script: Rename-Item -path "C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys" -NewName "MachineKeys_old", then reboot.
Allow RDP Through Firewall: Ensure both "Remote Desktop" and "Remote Desktop (WebSocket)" are checked for Private and Public networks in your firewall settings.
Try the Microsoft Store RDP App: Users on Microsoft Q&A report that the modern Remote Desktop app from the Microsoft Store often bypasses errors found in the built-in mstsc.exe client. Quick Troubleshooting Steps
Restart both machines: Simple reboots can often clear stuck sessions or temporary network glitches.
Check VPN Stability: If you are using a VPN, disconnect and reconnect, or check if the bandwidth is sufficient for a remote session.
Flush DNS: On your local computer, open Command Prompt and run ipconfig /flushdns.
Are you connecting to a local computer on your network, or is this a cloud-based server like an Azure VM? Fix Remote Desktop Error Code 0x904: 4 Working Solutions
Remote Desktop Connection Error Code 0x904 (often accompanied by extended error code 0x7) is a generic connection failure that typically stems from network instability, expired security certificates, or firewall blocks. It is most common in modern Windows 10/11 environments and Windows Server setups. Core Causes & Fixes 1. Expired RDP Certificates (Most Common)
The error often triggers when a server's self-signed RDP certificate expires, as they do not always renew automatically.
Fix: Log into the affected server locally. Open the Certificates MMC snap-in (certlm.msc), navigate to Remote Desktop > Certificates, and delete any expired certificates. Restart the Remote Desktop Services (TermService) to force Windows to generate a new certificate. 2. Network & VPN Instability
Insufficient bandwidth, high packet loss, or slow VPN speeds frequently cause 0x904.
Fix: Verify your internet speed on both ends. If using a VPN, try reconnecting or switching to a more stable ISP. 3. Firewall & Antivirus Obstruction
Security software may block mstsc.exe even if Remote Desktop is technically "enabled". Confirm credentials
Fix: Access Allow an app through Windows Firewall and ensure both Remote Desktop and Remote Desktop (WebSocket) are checked for both Private and Public networks. Some users find that adding rdp.exe or mstsc.exe as an exception in third-party antivirus (like Bitdefender) resolves the issue. 4. Windows 11 Compatibility Bugs
Users have reported this error specifically after Windows 11 updates.
Workaround: Try connecting via the IP address of the remote machine instead of its hostname. Alternatively, download the Microsoft Store version of the Remote Desktop app, which often bypasses bugs found in the standard legacy client. Fixed: Remote Desktop 0x904 Error [2 Solutions] - AnyViewer
On client, if CRL/OCSP is blocked:
HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\Client
Create DWORD: "AllowCertRevocationCheck" = 0
Or via GPO: "Turn off automatic root certificates update" – but better to fix network access to CRL.
The client machine may have a corrupted license cache.
Steps:
Better because: It directly removes the corrupted license file that generic cleaning tools miss.
Error 0x904 is not a network glitch—it’s a licensing protocol failure. The better approach is to either:
Avoid wasting time on superficial checks. Use the targeted solutions above for a reliable fix.
Here’s a concise review and troubleshooting guide for Remote Desktop Connection error code 0x904:
Delete the default RDP connection file cache:
On RDP server:
# Get a valid cert (internal CA or public) with Server Authentication EKU
# Then assign to RDP listener
$cert = Get-ChildItem Cert:\LocalMachine\My | Where-Object $_.Subject -like "*your_hostname*"
wmic /namespace:\\root\cimv2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="$($cert.Thumbprint)"
Or via GUI: