This article covers how to resolve the error 'remote session disconnected because there are no remote desktop license servers'.
If the problems tend to be associated with the following user messages:
i. The remote session was disconnected because there are no Remote Desktop client access licenses available for this computer.
ii. The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license.
Then, configure the RD Licensing service by following the steps below:
1. Open Server Manager and navigate to Remote Desktop Services.
2. On Deployment Overview, select Tasks, and then select Edit Deployment Properties.
3. Select RD Licensing, then select the appropriate licensing mode for your deployment (Per Device or Per User).
4. Enter the fully qualified domain name (FQDN) of your RD License server, and then select Add.
5. If you have more than one RD License server, repeat step 4 for each server.
If the RD License Diagnoser lists other problems, such as "The RDP protocol component X.224 detected an error in the protocol stream and has disconnected the client," there may be a problem that affects the license certificates. Such problems tend to be associated with user messages, such as the following:
Because of a security error, the client could not connect to the Terminal server. After making sure that you are signed in to the network, try connecting to the server again.
In this case, refresh the X509 Certificate registry keys by following the steps given below:
To resolve this problem, back up and then remove the X509 Certificate registry keys, restart the computer, and then reactivate the RD Licensing server.
1. Open the Registry Editory and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM.
2. On the Registry menu, select Export Registry File.
3. Enter exported- Certificate into the File name box, then select Save.
4. Right-click each of the following values, select Delete, and then select Yes to verify the deletion:
ii. X509 Certificate
iii. X509 Certificate ID
iv. X509 Certificate2
5. Exit the Registry Editor and restart the RDSH server.
To fix Remote session was disconnected because there are no Remote Desktop client access licenses:
1. You need to delete the following registry key:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing.
2. If it doesn't work and you get the following error message: "The remote computer disconnected the session because of an error in the licensing protocol";
3. Then all you need to do is Right-Click on the Remote Desktop Connection icon and select "Run as Administrator".