AxMsRdpClient9 关闭登录对话框 [英] AxMsRdpClient9 Dismiss login dialog
问题描述
我正在使用 c# 编写 rdp 客户端.简单例子:
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();
因此,当我尝试连接到 Win7 或更低版本时,它可以完美运行,但是当我尝试连接到 Win Server 2012 时,rdpclient 无法连接并且不返回任何错误.当我使用此选项时,连接到 win 服务器工作正常:
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;
但是使用此选项时,当我尝试使用无效凭据连接到 win 服务器时,它会显示带有 login\pass 字段的对话框,我无法以编程方式关闭该对话框,我必须手动"执行此操作.所以问题是:如何在没有
but with this option, when I try to connect to win server with invalid credentials it shows dialog with login\pass 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 login\pass dialog in code?
推荐答案
解决方案是将 AllowPromptingForCredentials 设置为 false.
The solution is to set AllowPromptingForCredentials to false.
这篇关于AxMsRdpClient9 关闭登录对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!