我试图使用https://msdn.microsoft.com/en-us/library/jj553447(v=vs.85).aspx中描述的RDP子会话。
我的代码:
private void button1_Click(object sender, EventArgs e)
{
axMsRdpClient9NotSafeForScripting1.Server = "localhost";
Object True = true;
MSTSCLib.IMsRdpExtendedSettings extSettings = (MSTSCLib.IMsRdpExtendedSettings)axMsRdpClient9NotSafeForScripting1.GetOcx();
extSettings.set_Property("ConnectToChildSession", True);
axMsRdpClient9NotSafeForScripting1.Connect();
}
但是,在Connect()方法上有一个异常:
“值不属于扩展范围”。
С有人帮我吗?
发布于 2015-08-13 15:37:45
要连接到客户端会话,需要启用凭据安全服务提供程序支持。
在你连接之前做这个..。
IMsRdpClient7 msRdpClient = this.axMsRdpClient9NotSafeForScripting1.GetOcx() as IMsRdpClient7;
msRdpClient.AdvancedSettings7.EnableCredSspSupport = true;
https://stackoverflow.com/questions/31670504
复制相似问题