RDP is a protocol designed for remote connection to a Windows server.
The RDP connection process is quite simple, but sometimes, you can have difficulties logging on to a remote server using RDP. The system will display an error and its brief description; however, often the provided information is not enough to solve the problem.
This article will describe the two most frequent RDP errors when logging on to a remote server and how to fix them.
When connecting via RDP using the standard Windows utility, you may see an error window at the moment of logging on to the server.
That's how it looks:
As you can see in the picture, the error description does not explain anything other than saying that an internal error has occurred in RDP. There may be many reasons for this error. For example, it can occur due to incorrect connection settings or protocol security settings.
Below, we will consider the causes and possible solutions that helped other users eliminate the error.
The first thing to do is check that the RDP protocol listener is configured to work on port 3389 both on the server and the local machine. To do this, use the Registry Editor system application.
Before fixing the error, we will create a backup copy of the registry.
Press WIN+R and run regedt32
.
Create a backup copy. To do this, click the File tab in the registry window and then Export. Then select the location where to store the registry files. If any errors occur after making changes, you will be able to restore the registry (File → Import).
Now you need to go to the RDP-Tcp folder. To do this, enter this path and click Enter:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
You also can get to the folder by searching for it. Go to the Edit → Find and search for RDP-Tcp.
After the first result is found, check the path to the folder. It should be exactly this:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
If the path differs, keep pressing the F3 button until you find the correct folder.
In the folder, look for the parameter called PortNumber and check If its value is 3389.
If not, change it to 3389 (double click on PortNumber → select Decimal → enter the number).
Repeat the previous step, but this time for the remote server.
Restart the services. We describe how to do it in the Solution #2.
Log in to the server again.
Whether the ports were configured correctly from the beginning or you changed their values as described in Solution #1, now you'll need to restart the Remote Desktop service.
Use the Computer Management utility to avoid restarting devices that may be in operation.
Use the WIN+R shortcut and run compmgmt.msc
.
Go to the Services and Applications tab and open Services.
Find Remote Desktop Services and click Restart the Service as shown in the image below.
Perform the two previous steps again, but this time for the server. To do this, right-click on the Computer Management tab and then Connect to another computer.
After establishing the connection, repeat steps 2 and 3.
Try to connect to the server.
To check the status of the RDP protocol on the server, use the Registry Editor application from Solution #1.
Press the WIN+R key combination and run regedt32
.
Click File → Connect Network Registry as shown in the image below.
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
When using search, press the F3 key until the address of the folder matches the address above.
Look for the fDenyTSConnections parameter. It can take two values: either 0 or 1. The first one indicates that the RDP protocol is working successfully. The second indicates that it is disabled.
Change the parameter value to 0.
Perform the same for the Terminal Services folder:
Go to the path:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
Find the fDenyTSConnections parameter.
Change its value to 0.
Try logging in to the server again.
Another solution for the RDP internal error is to adjust the connection settings.
In the Remote Desktop Connection program, click Show Options to open additional connection settings.
Go to the Experience tab.
Check or uncheck the Reconnect if connection is dropped box depending on what state it is in now.
Try to reconnect.
Apart from the solutions listed above, you can try clearing the connection cache.
First, you should enable the display of hidden folders. To do this, open any directory on your computer, click View → Show and check Hidden items.
Go to the Cache folder located at:
C:\Users\%Username%\AppData\Local\Microsoft\Terminal Server Client
Click Win+R and run regedt32
to go to the Registry Editor.
Go to the Terminal Server Client folder, located here:
Computer\HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client
Delete all entries there as well.
Restart the computer and reconnect to the remote server.
The "An internal error has occurred" issue in RDP can also be solved by increasing the registry parameter responsible for limiting the number of network connections. This parameter defaults to 3000 in network versions and only 100 in desktop versions. It can get clogged up very quickly, causing troubles when logging in.
To fix the problem, you should increase the size of the MaxOutstandingConnections parameter. To do this, launch the terminal as administrator and execute the command:
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v MaxOutstandingConnections /t REG_DWORD /d 65536
Now restart Remote Desktop Services and try logging into the server again.
Another frequent RDP protocol error is the authentication error that occurs at the authorization stage of connecting via RDP.
As you can see from the picture above, the system is pointing the user to a possible CredSSP-related error.
CredSSP is a Windows protocol that is used to transfer credentials securely from the local machine to the server. It protects the user from DDoS attacks or unauthorized access to the server.
Credential error often occurs due to a lack of security updates on the user's computer or the remote server itself.
After you successfully log in to the server, you can download the security updates from the official Microsoft site or in the Windows Update Center section of your system settings.
This solution will work for users running Windows Home.
Open the terminal as administrator.
Enter the command into the terminal line:
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters /v AllowEncryptionOracle /t REG_DWORD /d 2
The command will adjust the Windows Registry by adding a key that modifies the CredSSP security policy. The value 2 sets the lowest security level.
Reboot the device.
Try to connect to the server.
Be sure to install the necessary security updates on the server.
After completing the updates, restore the initial security settings using the command from step 2. Only instead of 2 at the end, you should enter 0.
The solution below will work for those who use the professional version of Windows.
Open the Local Group Policy Editor system application. Use the WIN+R key combination and open gpedit.msc
.
Navigate to the Credentials Transfer folder (Computer Configuration → Administrative Templates → System → Credentials Delegation).
Find the Encryption Oracle Remediation setting and click on it twice.
In the next window, check the Enable box and select Vulnerable in the Protection level field.
Image source: anyviewer.com
Reboot the device.
Try to connect to the server.
Install all security updates.
Once the updates are complete, return the Encryption Oracle Remediation parameter to its original state.
We have covered two prevalent connection errors in RDP: the "Internal error has occurred" error and the authentication error. We have provided solutions for each of them that will help most users eliminate the problems.