webRDP cannot connect to workstations due to NLA

webRDP cannot connect to workstations due to NLA

Issue

ActiveX and WebRDP clients cannot connect to Windows workstations.

Possible Errors:
  • The remote computer has ended the connection.
  • The server reset the connection.
  • Parameter(s) you provided caused an error.
  • The server requires that the client support Enhanced RDP Security with CredSSP.
  • Received an error connecting to: <CN_OF_WEBAPP>


Solution

Windows RDS has an option called Network Level Authentication under the Remote Desktop Connection settings.

When this option is checked then only RDP 6 or higher RDP clients can connect. This excludes the Microsoft ActiveX RDP control and the Java Proper RDP Client.

To connect using the webRDP HTML Client, you must pass the username, password, and domain as part of the initial connection/handshake.  NLA performs user authentication before actually completing a full RDS connection.  It basically tests the user's credentials to make sure they are valid before establishing an RDS connection.

This means that you cannot initiate a generic RDS connection to the login screen, requiring the user to then manually enter their credentials.  To setup a RDS application that brings up the Windows login requires disabling NLA on the host workstation/server.

To disable NLA on the workstation:
  1. Access the workstation's System Control Panel.
  2. Select Remote settings.
  3. Uncheck the box for Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended).
  4. Click OK.