Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
456 views
in Technique[技术] by (71.8m points)

c# - AxMsRdpClient9 Dismiss login dialog

I am writing rdp client using c#. Simple example:

        AxMsRdpClient9NotSafeForScripting c = new AxMsRdpClient9NotSafeForScripting();
        Form1.Controls.Add(c);
        c.Server = s.ip;
        c.UserName = s.pass;
        c.AdvancedSettings9.ClearTextPassword = s.pass;
        c.Connect();

So, when I try to connect to Win7 or less it works perfect, but when I try to connect to Win Server 2012, rdpclient doesn't connect and doesn't return any errors. Connecting to win server works when I use this option:

c.AdvancedSettings9.EnableCredSspSupport = true;

but with this option, when I try to connect to win server with invalid credentials it shows dialog with loginpass fields, that I can't dissmiss programmatically, I have to do it "by hand". So question is: how can I connect to win server without

c.AdvancedSettings9.EnableCredSspSupport = true;

or how can I dissmiss loginpass dialog in code?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The solution is to set AllowPromptingForCredentials to false.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...