c# - 将 RDP 构建到 C# 应用程序中

标签 c# rdp

我目前正在尝试将 RDP 构建到我制作的应用程序中。我们经常需要定期连接到许多服务器,并且希望我们的员工无需了解所有服务器的详细信息。

我目前正在尝试使用示例:http://www.codeproject.com/KB/cs/RemoteDesktop_CSharpNET.aspx

当使用上面的方法时,我收到以下错误:

Retrieving the COM class factory for component with CLSID {791FA017-2DE3-492E-ACC5-53C67A2B94D0} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

来自这段代码:

MsRdpClient rdp1;
rdp1 = new MSTSCLib.MsRdpClient();

非常感谢任何帮助,谢谢。

最佳答案

将您的 Visual Studio 项目设置为 x86 构建。

项目属性 -> 构建选项卡 -> 平台目标 -> x86

enter image description here

如果没有帮助,请尝试通过 regsvr32 注册 com dll .

关于c# - 将 RDP 构建到 C# 应用程序中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15615160/

相关文章:

c# - 检查日期等于月份的第一个日期 C#

c# - 如何在 MVC 应用程序中显示数字状态

amazon-web-services - AWS : Associate already assigned Elastic IP to a new instance

c# - 程序化 RDP 登录和 SendMessage

windows-server-2008 - 无法到达 Windows 服务器 : "Please wait for the Local Session Manager"

remote-desktop - Windows RDP 与各种版本的 NX

console - 如何连接到 vmware ESXi 远程控制台

c# - 更改特定键的哈希表值

c# - asp.net 的 dnx ef 7 迁移错误

c# - 改变下拉菜单列表项正方形