WMI:RPC服务器不可用。 (从HRESULT异常:0x800706BA)抛出时,尝试连接到远程计算机连接到、抛出、不可用、异常

由网友(别涉世太深)分享简介:我用下面的code。使用WMI连接到远程计算机:I'm using the following code to connect to remote machine using WMI:ConnectionOptions connOptions = new ConnectionOptions();connOptions...

我用下面的code。使用WMI连接到远程计算机:

I'm using the following code to connect to remote machine using WMI:

   ConnectionOptions connOptions = new ConnectionOptions();
            connOptions.Impersonation = ImpersonationLevel.Impersonate;
            connOptions.EnablePrivileges = true;
            connOptions.Username = "admin";
            connOptions.Password = "password";
            ManagementScope scope = new ManagementScope(String.Format(@"{0}ROOTCIMV2", remoteMachine), connOptions);
            scope.Connect();

我收到以下异常:RPC服务器不可用。 (从HRESULT异常:0x800706BA)

I'm getting the following exception: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

经过所有步骤描述in这篇知识库文章,一切都在远程机器确定。

Checked all steps described in this knowledgebase article, everything is OK on remote machine.

用户是管理员在远程机器上。

User is Administrator on remote machine.

试过WBEMTEST工具,同样的结果。

Tried Wbemtest tool, the same result

有没有人有一个想法发生了什么事?

Does anyone has an idea what is happening?

在前进,谢谢 Vasyl

Thanks in advance, Vasyl

推荐答案

如果你的Win7下,你必须应用程序以管理员身份运行。您也可以尝试connOptions.Impersonation属性的值不同。你打开RPC端口的远程计算机上?请尝试关闭防火墙altogeter在两台机器上。

If you under Win7 you must run app as an administrator. You can also try different values for connOptions.Impersonation property. Did you open RPC port on a remote machine? Try turning off firewall altogeter on both machines.

阅读全文

相关推荐

最新文章