Remote Desktop Connection Error Code 0x904 Extended Error Code 0x7 Best
Fixing Remote Desktop Error Code 0x904 (Extended Code 0x7) Remote Desktop Connection (RDP) error code 0x904 with extended error code 0x7 is a common connection failure that often occurs after Windows updates (especially Windows 11 upgrades) or when network conditions are unstable. It typically signifies that the client is unable to establish a secure, stable handshake with the remote host. Core Causes
Unstable Network/VPN: Insufficient bandwidth, high packet loss, or slow VPN connections.
Expired RDP Certificates: Self-signed certificates on the host machine may have expired and failed to auto-renew.
Encryption Mismatches: A failure in TLS/SSL negotiation where the client and server do not support the same cipher suites.
Firewall Blockage: Antivirus software or Windows Defender Firewall may be blocking the connection on either the source or destination.
OS Compatibility: Frequent issues reported when connecting from Windows 11 to older Windows Server versions. Step-by-Step Solutions 1. Renew Expired RDP Certificates
Expired self-signed certificates are a primary cause of this error on servers that haven't been rebooted in a while.
Log into the remote server locally or via a different remote access tool.
Press Win + R, type certlm.msc, and press Enter to open the Certificates console. Navigate to Remote Desktop > Certificates.
Check the expiration date. If expired, delete the old certificate.
Open an elevated Command Prompt and restart the term service to generate a new certificate:restart-service termserv -force.
It looks like there's no response available for this search. Try asking something else. Unable to RDP into some Windows Servers - Error code: 0x904
Summary
Error Code 0x904 with Extended Error 0x7 is an authentication handshake failure.
- For Cloud/Azure Users: It is almost certainly a token caching issue. Reset the WAM or use the Web Client.
- For Local Users: Check your Group Policy settings regarding Credential Delegation and NLA.
Did these fixes work for you? Let us know in the comments if you found a different solution!
Part 5: Advanced Diagnosis – Using Wireshark & Event Viewer
For IT professionals seeking the best permanent solution, use logging to pinpoint the exact trigger.
1. Check the Windows Event Log on the Remote Machine:
- Open
Event Viewer->Windows Logs->System. - Filter for
Source: RemoteDesktopServices-RDPCoreTS. - Look for Event ID 226 (fatal error). It will mention "Error code: 0x904" and provide the exact sub-error.
2. Analyze the Network Trace:
- On the local machine, run
netsh trace start scenario=NetConnection capture=yesbefore connecting. - Reproduce the error, then run
netsh trace stop. - Open the generated
.etlfile in Microsoft Network Monitor. Look forRDPpackets followed by aRST(reset) flag – that confirms the remote kernel forced closure.
Part 6: Preventing Future Occurrences of 0x904 Extended 0x7
Once you resolve the error, implement these best practices to ensure it never returns:
- Regularly clear RDP cache using a scheduled task:
del /q %USERPROFILE%\Documents\Default.rdp - Update your RDP client – Use the latest version of Microsoft Remote Desktop from the Store, not the legacy
mstsc.exeif possible. - Stable network conditions – Ensure jitter is below 15ms and packet loss is 0%. Error 0x7 thrives on unstable connections.
- Use RDP Gateway – Instead of direct RDP, route through a Remote Desktop Gateway to stabilize authentication.
1. Clear the RDP client license cache (most common fix for 0x904 + 0x7)
- Close all RDP sessions
- Open Regedit
- Navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing - Delete the entire MSLicensing key (back it up first if you prefer)
- Restart your computer
- Try connecting again — Windows will recreate the license store
Final Verdict
Error 0x904 Extended 0x7 is a "False Positive" error—it looks like a permissions issue, but it is usually a protocol negotiation failure. While the error message itself is cryptic and unhelpful, the resolution is straightforward if you disable UDP.
Pros of the fix:
- Does not require a reboot.
- Stabilizes the connection significantly.
Cons of the error:
- Microsoft provides no documentation on this specific extended code, leading to significant troubleshooting time.
Recommendation: If you are an IT admin, push out the "Turn off UDP on Client" group policy to users experiencing this issue. If you are an end-user, try Fixing Remote Desktop Error Code 0x904 (Extended Code
Remote Desktop Error 0x904 (Extended Error 0x7) typically indicates a failure to establish a stable network handshake or an authentication mismatch between the client and the remote host. Key Causes and Quick Fixes
Expired RDP Certificates: This is the most common "hidden" cause. If a server's self-signed certificate expires, it won't automatically renew, leading to random connection failures on specific hosts.
Unstable Network/VPN: This error frequently occurs due to packet loss, insufficient bandwidth, or slow VPN connections.
Windows 11 Compatibility: Recent builds (22H2+) sometimes struggle with hostname resolution for RDP, throwing this error even when the network is fine.
Firewall Blocking: Even if RDP is enabled, Windows Defender or third-party security software like Bitdefender may block the specific mstsc.exe process. Step-by-Step Troubleshooting Guide 1. Renew Expired RDP Certificates
If you can access the server via another method (e.g., local console or Azure portal): Open the Certificates MMC snap-in (certlm.msc). Navigate to Remote Desktop > Certificates.
Check the expiration date. If expired, delete the old certificate.
Restart the Remote Desktop Service by running restart-service termserv -force in an elevated PowerShell. Windows will automatically generate a new one. 2. Connect via IP Address
Bypass potential DNS or hostname resolution issues by entering the remote computer's IP address directly into the Remote Desktop Connection client instead of its name. 3. Adjust Firewall Rules
Ensure RDP is fully permitted in Windows Firewall. Verify that Remote Desktop and Remote Desktop (WebSocket) are enabled for both Private and Public networks. 4. Fix Azure VM Certificate Corruption
For Azure VMs, a corrupted key store often causes this error. This guide from remoteaccesspcdesktop.com details using Azure Portal's "Run command" to rename the MachineKeys folder, which forces a rebuild of the certificate store upon restart. After Windows 11 Upgrade RDP Error 0x904 extended error 0x7
Remote Desktop error 0x904 (Extended error 0x7) typically indicates a network instability or a security handshake failure, such as expired certificates or mismatched encryption settings. This error is common on modern Windows 10/11 and Windows Server (2016-2022) environments. Quick Fixes
Switch to IP Address: Attempt to connect using the remote computer's IP address instead of its hostname to bypass potential DNS resolution issues.
Restart RDP Services: On the remote machine, open a Command Prompt as Administrator and run:net stop termservice then net start termservice.
Check VPN/Network: If you are using a VPN, disconnect and reconnect. Slow or high-latency VPN connections are a primary cause of this specific error code. Detailed Troubleshooting Guide 1. Fix Expired RDP Certificates (Server Side)
Expired self-signed certificates are a frequent "hidden" cause for 0x904 errors on specific servers.
On the remote server, press Win + R, type certlm.msc, and press Enter. Navigate to Remote Desktop > Certificates.
Check if the certificate is expired. If it is, right-click and delete it.
Restart the Remote Desktop Services (as shown in Quick Fixes) to force Windows to generate a new valid certificate. 2. Adjust Security Layer Settings (GPO)
If the client and server have mismatched encryption ciphers, forcing a specific security layer can resolve the handshake failure.
Open the Group Policy Editor (gpedit.msc) on the remote server. Summary Error Code 0x904 with Extended Error 0x7
Go to: Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Security.
Require use of specific security layer for remote (RDP) connections: Set to Enabled and choose RDP from the dropdown.
Require user authentication... using Network Level Authentication (NLA): Set to Disabled for testing, then restart the server. 3. Firewall & Antivirus Exceptions
Third-party security software (like Bitdefender) often blocks RDP after Windows updates.
Ensure mstsc.exe is added to the exception list in your antivirus.
Verify Windows Firewall allows both Remote Desktop and Remote Desktop (WebSocket) for Private and Public networks on both machines. 4. Registry Modification (Client Side)
Adding a specific transport key can help the client handle modern RDP gateway connections better. Unable to RDP into some Windows Servers - Error code: 0x904
Remote Desktop error 0x904 (extended error 0x7) typically indicates a general network connection failure, often triggered by expired RDP certificates firewall blocks unstable network/VPN conditions www.remoteaccesspcdesktop.com Core Troubleshooting Steps Renew Expired RDP Certificates: On the remote server, open certlm.msc , navigate to Remote Desktop > Certificates , and delete expired certificates. Restart Remote Desktop Services to generate a new one. Use IP Address:
Bypass DNS issues by connecting using the server’s internal IP address instead of its hostname. Verify Firewall Settings: Remote Desktop
is allowed in Windows Firewall for both Private/Public networks. Add exceptions for in third-party security software if necessary. Use Microsoft Store App: Try using the alternative Microsoft Remote Desktop app for better compatibility. Fix Certificate Store (Azure): If using Azure VMs, rename C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys to address potential corruption. Spiceworks Community Additional Solutions Restart Remote Host: Reboot the server to resolve service issues. Check VPN: Ensure your connection is stable. Disable NLA: If needed, disable Network Level Authentication (NLA) on the host for testing. Spiceworks Community Are you connecting to a local server cloud-hosted machine like an Azure VM? After Windows 11 Upgrade RDP Error 0x904 extended error 0x7 30 Jun 2021 —
Remote Desktop error 0x904 (Extended Error 0x7) is a general connectivity failure usually triggered by expired self-signed certificates, network instability, or firewall blocks. Top Fixes for Error 0x904 / 0x7
Renew Expired RDP CertificatesRDP relies on a self-signed certificate that may not auto-renew. If this certificate expires, the connection will fail instantly.
Log into the host machine locally or via an alternative tool. Run certlm.msc to open the certificate manager. Navigate to Remote Desktop > Certificates. If the certificate is expired, Delete it.
Restart the Remote Desktop Services (termserv) via the Services app or PowerShell (restart-service termserv -force) to trigger the generation of a new certificate.
Fix Corrupt Certificate Store (Azure VMs)If you are using an Azure Virtual Machine, a corrupt MachineKeys folder can prevent RDP from functioning.
Use the Run Command feature in the Azure Portal to execute this PowerShell command:Rename-Item -path "C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys" -NewName "MachineKeys_old". Reboot the VM to allow Windows to rebuild the folder.
Verify Firewall and Port 3389Firewalls may block RDP traffic even if the service is enabled.
Use PowerShell to test connectivity: Test-NetConnection [Remote_IP] -Port 3389.
On the host machine, ensure Remote Desktop and Remote Desktop (WebSocket) are allowed for both Public and Private networks in the Windows Firewall.
Adjust Security LayersMismatched encryption settings between the client and host can cause 0x904. On the host, open gpedit.msc.
Go to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Security. For Cloud/Azure Users: It is almost certainly a
Set Require use of specific security layer for remote (RDP) connections to Enabled and select RDP from the dropdown.
Disable Require user authentication... using Network Level Authentication (NLA) as a test to see if the connection establishes. Summary of Likely Causes Unable to RDP into some Windows Servers - Error code: 0x904
Remote Desktop error 0x904 (Extended Error 0x7) typically indicates a general network connectivity failure. It most commonly occurs due to unstable network conditions, expired RDP certificates, or firewall blocks. Phase 1: Network & VPN Stability
This error is frequently triggered by insufficient bandwidth or packet loss.
Reconnect VPN: If you are using a VPN, disconnect and reconnect to refresh the tunnel.
Use IP Address: Try connecting using the remote computer's IP address instead of its hostname to rule out DNS resolution issues.
Test Ping: Run a ping -t [remote-ip] to check for high latency or dropped packets. Phase 2: Fix Expired RDP Certificates
A common cause in server environments is an expired self-signed RDP certificate that fails to renew automatically.
Log into the target server (locally or via an alternative remote tool).
Press Win + R, type certlm.msc, and hit Enter to open the Certificate Manager. Navigate to Remote Desktop > Certificates.
Locate the expired certificate, right-click it, and select Delete.
Restart the Remote Desktop Service to generate a new certificate by running this command in an administrator Command Prompt:restart-service termserv -force. Phase 3: Firewall & Security Software
Security suites like Bitdefender or Windows Firewall may block the specific RDP process.
Allow mstsc.exe: Ensure Remote Desktop and Remote Desktop (WebSocket) are allowed through the firewall on both the source and destination computers.
Add Exception: Add C:\Windows\System32\mstsc.exe to your antivirus/firewall exclusion list. Phase 4: Azure VM Specific Fix
If the error occurs on an Azure Virtual Machine, the certificate store may be corrupt. Access the VM via the Azure Portal. Use the Run command feature and select RunPowerShellScript.
Execute the following to rename the corrupt key folder:Rename-Item -path "C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys" -NewName "MachineKeys_old". Reboot the server.
Are you connecting over a local network or a wide-area network/VPN? Unable to RDP into some Windows Servers - Error code: 0x904
Troubleshooting Remote Desktop Connection Error Code 0x904 with Extended Error Code 0x7
Are you encountering the frustrating Remote Desktop Connection (RDC) error code 0x904 accompanied by an extended error code 0x7? This error typically occurs when there's a problem establishing a connection to the remote computer. Don't worry; we've got you covered. In this article, we'll guide you through the possible causes and provide step-by-step solutions to resolve this issue.
Understanding the Error Codes
- Error code 0x904: This is a generic error code indicating a problem with the RDC connection.
- Extended error code 0x7: This code provides more specific information about the error, often related to authentication or network connectivity.
Possible Causes of the Error
- Network Connectivity Issues: Poor or unstable network connections can prevent RDC from establishing a successful connection.
- Authentication Problems: Incorrect credentials, password expiration, or issues with the authentication process can cause this error.
- Remote Desktop Settings: Misconfigured RDC settings on the remote computer or the client machine can lead to connection failures.
- Firewall or Security Software Interference: Overly restrictive firewall rules or security software might block the RDC connection.
Step-by-Step Solutions