【发布时间】:2014-08-07 09:59:57
【问题描述】:
我正在尝试在 Management Scope 的帮助下从我的本地计算机连接远程系统。
我尝试的是:
我的代码如下,
ConnectionOptions con= new ConnectionOptions();
con.Username = strUsername;
con.Password = strPassword;
con.Impersonation = ImpersonationLevel.Impersonate;
con.EnablePrivileges = true;
ManagementScope ManagementScope1 = new ManagementScope(string.Format("\\\\{0}\\root\\cimv2", strIP), con);
ManagementScope1.Connect();
我的问题是:
使用上面的代码,当远程系统有用户名和密码时,我可以连接远程系统。(strUsername = "User", strPassword="Welcome")
但如果密码为空 (strUsername = "User", strPassword = "") ,则会收到名为“Access is Denied”的错误。连接的远程系统没有密码保护。
远程系统用户授予了访问机器的各种权限,但仍然面临这个奇怪的问题。
请告诉我哪里出错了。任何帮助深表感谢。提前致谢。
【问题讨论】:
-
您是否尝试过以管理员身份使用您的应用程序?
-
是的,我仅以管理员身份工作和运行我的应用程序。
标签: c# networking system remote-access