I Remote Desktop Connection Error Code: 0x904 Better

Remote Desktop Connection error (often accompanied by extended error code

typically signals a network-level connection failure caused by expired RDP certificates firewall blocks hostname resolution issues Quick Fixes Connect via IP Address : Instead of using the computer name (e.g., ), use the internal IP address (e.g., 192.168.1.50 ) in the "Computer" field of the Remote Desktop Connection app Use the Microsoft Store App : Users often find that the Microsoft Store version of Remote Desktop bypasses bugs present in the built-in Windows Restart RDP Services

: On the remote machine, open a Command Prompt as Administrator and run: net stop termservice && net start termservice www.remoteaccesspcdesktop.com Advanced Troubleshooting If the quick fixes fail, follow these steps in order: 1. Renew Expired RDP Certificates

Expired self-signed certificates are a primary cause of 0x904 errors. www.remoteaccesspcdesktop.com remote computer certlm.msc , and hit Enter. Navigate to Remote Desktop Certificates Right-click and any expired certificates.

Restart the computer; Windows will automatically generate a fresh certificate upon reboot. www.remoteaccesspcdesktop.com 2. Adjust Firewall Settings

Ensure the firewall isn't blocking RDP traffic on either end: Search Windows for "Allow an app through Windows Firewall." Remote Desktop Remote Desktop (WebSocket) are checked for both If using third-party antivirus (like Bitdefender), add to the exception list. www.remoteaccesspcdesktop.com 3. Fix Certificate Store Corruption (Azure/Advanced) If certificates cannot be generated, the MachineKeys folder may be corrupt. www.remoteaccesspcdesktop.com

: Use the "Run Command" feature in the Azure Portal to run this PowerShell script:

Rename-Item -path "C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys" -NewName "MachineKeys_old"

: Run the same command in PowerShell as Administrator, then reboot. www.remoteaccesspcdesktop.com 4. Security Layer Configuration

In cases of mismatched encryption, forcing a specific security layer can help. Microsoft Learn Unable to RDP into some Windows Servers - Error code: 0x904 24-Apr-2025 —

Troubleshooting Remote Desktop Connection Error Code 0x904: A Comprehensive Guide

Are you frustrated with the Remote Desktop Connection error code 0x904? You're not alone! Many users have reported encountering this issue while trying to establish a remote desktop connection. In this blog post, we'll explore the possible causes of error code 0x904 and provide you with practical solutions to resolve it.

What is Error Code 0x904?

Error code 0x904 is a common issue that occurs when trying to establish a Remote Desktop Connection (RDC) to a Windows machine. The error message typically reads: "The remote computer disconnected. The error code is 0x904." This error can occur due to various reasons, including network connectivity issues, incorrect configuration, or problems with the remote desktop software. i remote desktop connection error code 0x904 better

Causes of Error Code 0x904

After analyzing various user reports and technical forums, we've identified some common causes of error code 0x904:

  1. Network Connectivity Issues: Poor or unstable network connections can prevent a successful RDC connection, resulting in error code 0x904.
  2. Incorrect RDC Configuration: Misconfigured RDC settings, such as incorrect port numbers or authentication settings, can cause the error.
  3. Remote Desktop Software Issues: Problems with the remote desktop software, including outdated or corrupted files, can lead to error code 0x904.
  4. Firewall or Antivirus Software Interference: Overly restrictive firewall or antivirus software settings can block the RDC connection, causing the error.

Solutions to Resolve Error Code 0x904

Don't worry; we've got you covered! Here are some step-by-step solutions to help you resolve error code 0x904:

Solution 1: Check Network Connectivity

  1. Ensure your network connection is stable and working properly.
  2. Try restarting your router or modem to resolve any connectivity issues.
  3. Verify that your network allows RDC connections (check with your network administrator if necessary).

Solution 2: Verify RDC Configuration

  1. Check the RDC settings on both the client and server machines:
    • Ensure the correct port number (default is 3389) is used.
    • Verify that the authentication settings (e.g., username, password, and domain) are correct.
  2. Try configuring the RDC settings to use a different authentication method (e.g., NTLMv2).

Solution 3: Update Remote Desktop Software

  1. Ensure you're running the latest version of the Remote Desktop client and server software.
  2. Check for any updates or patches for your Windows operating system.

Solution 4: Disable Firewall or Antivirus Software

  1. Temporarily disable your firewall or antivirus software to test if it's causing the issue.
  2. If disabling the software resolves the issue, consider adding an exception for RDC connections.

Solution 5: Check Event Logs

  1. Check the Event Logs on both the client and server machines for any related errors or warnings.
  2. Analyze the logs to identify potential causes of the issue.

Conclusion

Error code 0x904 can be frustrating, but with these solutions, you should be able to resolve the issue and establish a successful Remote Desktop Connection. If you're still experiencing problems, feel free to leave a comment below, and we'll do our best to help you troubleshoot the issue.

Additional Tips

  • Regularly update your Windows operating system and remote desktop software to ensure you have the latest security patches and features.
  • Consider using alternative remote desktop solutions, such as TeamViewer or AnyDesk, if you're experiencing persistent issues with RDC.

By following these solutions and tips, you should be able to overcome error code 0x904 and enjoy a seamless remote desktop experience. Network Connectivity Issues : Poor or unstable network

Troubleshooting Guide for Remote Desktop Connection Error Code 0x904

Error Overview

The Remote Desktop Connection error code 0x904 typically occurs when there is an issue with the Remote Desktop Protocol (RDP) connection. This guide provides steps to help you troubleshoot and resolve the error.

Step 1: Check the Basics

  • Ensure that the remote computer is turned on and connected to the network.
  • Verify that Remote Desktop is enabled on the remote computer.
  • Check that the computer name or IP address of the remote computer is correct.

Step 2: Update Remote Desktop Connection

  • Ensure that your Remote Desktop Connection client is up-to-date. You can check for updates in the Microsoft Store (for Windows 10/11) or by visiting the Microsoft website.

Step 3: Disable Network Level Authentication (NLA)

  • On the remote computer, go to Settings > System > Remote Desktop.
  • Toggle Enable Remote Desktop to On.
  • Scroll down and toggle Require devices to use Network Level Authentication (NLA) to connect to Off.

Step 4: Check Firewall and Port Settings

  • On the remote computer, ensure that the Windows Firewall allows incoming Remote Desktop connections:
    • Go to Control Panel > System and Security > Windows Defender Firewall.
    • Click Allow an app or feature through Windows Defender Firewall.
    • Ensure that Remote Desktop is allowed.
  • Verify that the correct ports are open:
    • Remote Desktop typically uses port 3389.

Step 5: Run the Remote Desktop Connection Troubleshooter

  • On the client computer, go to Settings > Update & Security > Troubleshoot.
  • Click Additional troubleshooters.
  • Search for Remote Desktop and run the troubleshooter.

Step 6: Reset Remote Desktop Settings

  • On the client computer, go to Registry Editor (Press Win + R and type regedit):
    • Navigate to HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client.
    • Delete any subkeys related to the remote computer.

Step 7: Reconnect and Verify

  • Re-establish the Remote Desktop Connection using the same computer name or IP address.
  • If the issue persists, try connecting from a different client computer.

If none of these steps resolve the error, you may want to consider seeking additional assistance from a system administrator or Microsoft support resources.

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. Solutions to Resolve Error Code 0x904 Don't worry;

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.

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


Part 4: Why “Better” Means Automating the Fix

A truly “better” resolution to error 0x904 isn’t just manual steps—it’s automation. Here’s a PowerShell script that detects and repairs the most common 0x904 causes on a local or remote machine. Run it on the host with admin privileges:

# Fix RDP Error 0x904 - Certificate & Security Layer Reset
Write-Host "Fixing RDP Error 0x904..." -ForegroundColor Cyan

Step 4: Disable Conflicting Software

  1. Disable antivirus software: Temporarily disable antivirus software that may be interfering with RDC.
  2. Check for conflicting software: Identify and disable any software that may be using the same ports as RDC (e.g., other remote access tools).

What is Error Code 0x904?

Error code 0x904 is generally categorized as a DNS or Network Discovery failure. In simple terms, your computer is trying to "dial" the remote machine, but it doesn't know the correct "phone number" (IP address) associated with the name you entered, or the network path is blocked.