Go to "Allow an app through Windows Firewall" and ensure both Remote Desktop and Remote Desktop (WebSocket) are checked for Private and Public networks.
: Sometimes, a simple rule change is needed. As suggested by users on Spiceworks Community , you verify that both "Remote Desktop" and "Remote Desktop (WebSocket)" are allowed through the Windows Firewall on both ends.
If the certificate has passed its validity window, right-click it and choose .
Click . Once executed, reboot the Virtual Machine through the Azure management console.
Error code 0x904 in Remote Desktop Connection (RDP) typically signals that a connection could not be established due to expired or corrupt security certificates network instability firewall blocks i remote desktop connection error code 0x904 install
A common pattern for the 0x904 error is a Windows 11 client failing to connect, while a Windows 10 client succeeds. This is often due to TLS/SSL protocol differences:
Add C:\Windows\System32\mstsc.exe to the allowed list on both the client and host.
: Aggressive firewall rules or third-party endpoint antivirus packages block the execution parameters of rdp.exe . Phase 1: Renewing Expired Self-Signed RDP Certificates
Ensure the Windows Firewall allows RDP traffic. While port 3389 must be open, the recommended approach is to allow the Remote Desktop app: Go to "Allow an app through Windows Firewall"
A: That indicates a corruption in the Windows Server side. Run DISM /Online /Cleanup-Image /RestoreHealth and ensure the ServerMediaStack feature is not blocked by Group Policy.
: MTU mismatches, dropped packets, or aggressive deep packet inspection (DPI) on business VPNs terminate the session.
Click , click OK , and restart your server to apply changes. 3. Clear the MachineKeys Store (For Azure VMs)
Access the remote server locally or via an alternative method. If the certificate has passed its validity window,
Navigate to the folder and select Certificates .
Before diving into the solutions, it helps to understand why this error happens. The most common culprits include:
is one of the most frustrating obstacles Windows users encounter when attempting to establish a Remote Desktop Protocol (RDP) session. Unlike standard network timeout errors, the 0x904 error typically manifests immediately upon connection or during the software installation phase of the Remote Desktop client. If you are searching for "i remote desktop connection error code 0x904 install," you are likely facing a situation where either the RDP client failed to install correctly, or the existing installation is corrupted, preventing any outbound connections.
Windows will automatically generate a new, valid self-signed certificate. 2. Connect via IP Address instead of Hostname
On the target virtual machine, navigate to the following file path: C:\ProgramData\Microsoft\Crypto\RSA\ Use code with caution. Locate the folder explicitly named MachineKeys .