Search code examples
c#remote-desktoprds

Authenticating Against A Remote Desktop Services Gateway


I need to authenticate a username and password input against a Remote Desktop Services Gateway before connecting the user using the normal windows RDP client because I need to override the default UI behavior of the RDP client in event of invalid credentials and I cannot use LDAP or another service as it has to work from outside the network where only the RDS gateway is available.

I haven't been able to find much in the way of documentation for the RDS Gateway API exccept for this: http://msdn.microsoft.com/en-us/library/ee672219(v=vs.85).aspx but there are no examples or much of anything.

Has anyone had any experience doing something similar?


Solution

  • Well, one option would be to write your own RDG client: see the Terminal Services Gateway Protocol Reference and the authentication handshake section. It doesn't actually sound too difficult to do, since the handshake is implemented entirely with basic HTTP requests.