RDP Client with NLA asking for Password

64 views Asked by At

Good day, I am unfamiliar with this kind of activity so forgive any poor framing here.

I am attempting to connect with an NLA environment. We were getting error 2825, so we went and enabled EnableCredSspSupport, setting it to "true." This seems to have fixed the issue, as we no longer get the error 2825.

However, we are being prompted to enter the password, even though it's already being passed to the RPD client like so: axMsRdpClient71.AdvancedSettings8.ClearTextPassword = _logon.Password;

Question: How can I stop RDP from prompting for a Password while still having it work with NLA?

Sample C# code below:

private AxMSTSCLib.AxMsRdpClient7 axMsRdpClient71;

axMsRdpClient71.UserName = _logon.MachineAccountName;
axMsRdpClient71.Domain = _logon.LogOnTo;

//Providing password here
axMsRdpClient71.AdvancedSettings8.ClearTextPassword = _logon.Password;

axMsRdpClient71.ColorDepth = 16;
axMsRdpClient71.AdvancedSettings2.PerformanceFlags = 111;

axMsRdpClient71.AdvancedSettings8.EnableCredSspSupport = true;
    
axMsRdpClient71.Server = _logon.MachineName;
axMsRdpClient71.TransportSettings3.GatewayCredSharing = 1;
axMsRdpClient71.TransportSettings3.GatewayCredsSource = 0;
axMsRdpClient71.TransportSettings3.GatewayDomain = _logon.LogOnTo;
axMsRdpClient71.TransportSettings.GatewayHostname = _logon.RemoteDesktopGatewayAddress;
axMsRdpClient71.TransportSettings3.GatewayPassword = _logon.Password;
axMsRdpClient71.TransportSettings3.GatewayPreAuthRequirement = 0;
axMsRdpClient71.TransportSettings3.GatewayProfileUsageMethod = 1;
axMsRdpClient71.TransportSettings3.GatewayUsageMethod = 1;
axMsRdpClient71.TransportSettings3.GatewayUsername = _logon.MachineAccountName;
axMsRdpClient71.TransportSettings3.GatewayUserSelectedCredsSource = 0;

axMsRdpClient71.Connect();
0

There are 0 answers