Unexpected disconnection of remote desktop. Unable to use remote desktop. Error code: 0x4

Rat 0 Reputation points
2025-01-03T20:37:21.36+00:00

My computer system version is: Windows 10 Enterprise Edition Version number: 22H2 Operating system internal version: 19045.3803 Experience: Windows Feature Experience Pack 1000.19053.1000.0 The problem I encountered. During the remote desktop connection, the connection window of the remote desktop was accidentally disconnected and closed due to a network failure. The next time you use remote desktop to connect to other computers, you cannot use remote desktop to connect, prompting error code: 0x4 Extended error code: 0x0 Tried to reset the network connection "netsh int ip reset" 'netsh winsock reset" This operation is invalid Tried to use the "Dism" command to check the system but it is invalid Tried to use the "sfc /SCANNOW" command to check the system but it is invalid Tried to restart "Remote Desktop Services" but it is invalid Tried to use "Do not use RD Gateway Server" but it is invalid Checked RDP permissions but it is invalid I tried to turn off Windows Firewall and reconnect but it is invalid I tried to clear the cached rdp credentials but it is invalid Using the built-in remote desktop connection of Windows 10 prompts an error: An internal error occurred, but there is no error code attached. Using the remote desktop application provided by Microsoft prompts an error code: 0x4 The network of the remote computer is normal. If I connect to an unused IP address, the connection process can be displayed. Once the IP is a normally used remote computer, an error code is prompted: 0x4. This seems to be a problem with the remote desktop cache. The computer cannot connect to all computers that support remote desktop, but it can be connected to the computer using other computers.

This question was communicated through Google Translate. I have tried my best to keep the expression correct, but please understand that there may be errors due to machine translation.enter image description hereUser's image

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,667 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Karlie Weng 18,856 Reputation points Microsoft Vendor
    2025-01-08T00:27:16.57+00:00

    Hello,

    You can try to disable NLA in your terminal side :

    a. Open gpedit.msc applet.

    b. Navigate to Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Security.

    c. Enable Require use of specific security layer for remote (RDP) connections and select RDP as Security Layer.

    d. Disable Require user authentication for remote connections by using Network Level Authentication policy.

    e. Reboot Terminal server.

    And I noticed you are using an internal network address, are you using any VPN to the terminal side?


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.