Windows Remote Desktop Client fails to connect with error code 0x4 on only one of my computers

Anonymous
2024-03-16T15:51:11+00:00

I encountered this error message while attempting to connect to a remote host on one of my PCs. I have two computers on the same LAN, and I can easily connect to the remote host using the Windows Remote Desktop client without any issues on my other PC. So this means the remote host is configured correctly.

All settings are identical with no firewall present. What might be causing this issue?

[Window Title] Remote Desktop Connection

[Content] An internal error has occurred.

[^] Hide details [OK]

[Expanded Information] Error code: 0x4 Extended error code: 0x0 Timestamp (UTC): 03/15/24 09:14:35 PM

***moved from Windows / Windows 11 / Apps / Windows apps***

Windows for business | Windows Client for IT Pros | User experience | Remote desktop services and terminal services

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2024-08-14T23:57:54+00:00

on the remote computer:

rename a folder MachineKeys and reboot :  
ProgramData\Microsoft\Crypto\RSA\MachineKeys

make sure you keep the same permissions on the MachineKeys folder, plus you might need to re-import certificates for IIS if you had any

(use SMB connection or psexec):

\computername\c$

Was this answer helpful?

20+ people found this answer helpful.
0 comments No comments

16 additional answers

Sort by: Most helpful
  1. Anonymous
    2024-08-03T10:00:52+00:00

    MICROSOFT NEEDS TO FIX THIS ****

    I HAVE A DEGREE IN NETWORKING AND SUPPORT AND I CAN'T FIGURE IT OUT.

    IT'S NONE OF THE THINGS LISTED IN THAT POST.

    I CHECKED THEM ALL.

    WINDOWS RDP JUST DOESN'T WORK FOR SOME REASON!!!!!!

    Was this answer helpful?

    10+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-08-28T20:43:11+00:00

    Hello,

    The MachineKeys folder stores certificate pair keys for computers and users. Checking MachineKeys permissions helps resolve issues related to self-signed certificates.

    Image

    If the problem persists, it is recommended to refer to this article(An internal error has occurred - Windows Server | Microsoft Learn) to troubleshoot the following configurations:

    • Verify if the error is related to the network
    • Verify if the error is related to the encryption negotiation
    • Remote Desktop self-signed certificate
    • Security protocol negotiation

    Best regards

    Jacen

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2024-08-06T13:02:57+00:00

    I've seen this caused by an expired Cert bound to RDP.

    run nmap (or zenmap) against the server to see if it returns a thumbprint of the cert bound to 3389. If it does not return a thumbprint (and you know you use them) then that can be a problem.

    To solve, access the server via local console.

    Now check the SSL Cert bound to 3389 RDP by running the following from an elevated command prompt

    wmic /namespace:\root\cimv2\TerminalServices PATH Win32_TSGeneralSetting Get SSLCertificateSHA1Hash

    Does the thumbprint match a valid cert you are using in the Personal or RDP store? If not, then update it with a new certificate's thumbprint using :

    wmic /namespace:\root\cimv2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="<thumbprint without spaces>"

    Restart Remote Desktop Services from services.msc

    Should work.

    You can get the certificate thumbprint from certlm.msc in the personal store. Please note, I say thumbprint, not serial.

    Hope this helps.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  4. Reported
    Anonymous
    2024-03-18T06:33:02+00:00

    The 0x4 error code in Windows Remote Desktop (RDP) can be frustrating, especially when you’re trying to connect to a remote host. Let’s troubleshoot this issue and explore potential solutions:

    1. Network Connection and Stability:
      • Ensure that both your client and server systems have stable network connections with no interruptions, delays, or packet loss.
      • Verify that there are no network issues between the two computers. Sometimes even minor network glitches can cause RDP errors.
    2. Firewall and Security Settings:
      • Double-check that there are no firewall rules blocking RDP traffic on either side (client or server).
      • Confirm that the necessary ports (TCP port 3389 for RDP) are open and accessible.
    3. Restart Remote Desktop Services:
      • Restart the Remote Desktop Services on the remote host:
        • Open Services (you can search for it in the Start menu).
        • Locate Remote Desktop Services and restart it.
        • Try connecting again.
    4. User Authentication and Permissions:
      • Ensure that the user account you’re using has the necessary permissions to connect via RDP.
      • Verify that the user account is not locked or disabled.
    5. Update RDP Client and Server Software:
      • Make sure you’re using the latest version of the RDP client on your PC.
      • Check for any available updates for the RDP server (on the remote host).
    6. Configuration Settings:
      • Review the RDP configuration settings on both the client and server sides.
      • Pay attention to settings related to encryption, authentication, and network-level authentication (NLA).

    If none of the above steps resolve the issue, consider the following additional points:

    • Recent Updates: You mentioned that everything was working fine until recently. It’s possible that a recent update (either on your PC or the remote host) caused compatibility issues. Check if there were any recent updates applied to either system.
    • Downgrade RDP Client: If you suspect an RDP client update caused the issue, consider downgrading to an older version. You mentioned using macOS, so try using an older version of the Microsoft Remote Desktop client.

    Remember to test each step carefully and document any changes you make. If you’re still unable to connect, consider reaching out to Microsoft support or community forums for further assistance. 🌟

    0 comments No comments