RDP requesting password

185 Views Asked by At

I'm working on a RDP application, but windows is ignoring my password provided in the code and is showing the prompt for password input, here is my code:

rdp.Server = server
rdp.UserName = user
rdp.TransportSettings3.GatewayHostname = gateway
rdp.TransportSettings3.GatewayUsageMethod = 1
rdp.TransportSettings3.GatewayCredsSource = 4
rdp.TransportSettings3.GatewayProfileUsageMethod = 1
rdp.AdvancedSettings9.AuthenticationLevel = 0
rdp.AdvancedSettings9.EnableAutoReconnect = True
rdp.AdvancedSettings9.DisplayConnectionBar = True

Dim IRCNS As MSTSCLib.IMsRdpClientNonScriptable5 =
DirectCast(rdp.GetOcx(), IMsTscNonScriptable)

IRCNS.PromptForCredentials = False
IRCNS.AllowPromptingForCredentials = False
IRCNS.ClearTextPassword = pwd
IRCNS.PromptForCredsOnClient = False

rdpView.Connect()
0

There are 0 best solutions below