简体   繁体   English

WMI RPC服务器不可用。 (来自HRESULT的异常:0x800706BA)

[英]WMI The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

My application requirement is like below. 我的申请要求如下。 Application will run on domain admin system which will ping all machine under that domain, it will take disk drive, CPU and RAM details from all domain systems. 应用程序将在域管理系统上运行,它将对该域下的所有计算机执行ping操作,它将从所有域系统获取磁盘驱动器,CPU和RAM详细信息。

Whenever I'm trying to ping machine I'm getting error that 每当我尝试ping计算机时,我都会收到错误消息

"The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)" “ RPC服务器不可用。(HRESULT的异常:0x800706BA)”

Code I'm using to connect remote machine is 我用来连接远程计算机的代码是

ConnectionOptions options = new ConnectionOptions();
options.EnablePrivileges = true;
options.Impersonation = ImpersonationLevel.Impersonate;
options.Username = System.Configuration.ConfigurationSettings.AppSettings["AccessUserName"].ToString();
options.Password = System.Configuration.ConfigurationSettings.AppSettings["AccessPassword"].ToString();
options.Authority = "ntlmdomain:" + System.Configuration.ConfigurationSettings.AppSettings["DomainName"].ToString();
options.Authentication = AuthenticationLevel.Packet;
ManagementScope scope = new ManagementScope("\\\\" + sMachineIP + "\\root\\cimv2", options);
scope.Connect();

I found the solution for this. 我找到了解决方案。 I did it by enabling Windows Management Instrumentation (WMI) rule in Windows Firewall. 我通过在Windows防火墙中启用Windows Management Instrumentation (WMI)规则来做到这一点。

  1. Open Windows Firewall. 打开Windows防火墙。
  2. Allow app or feature through Windows Firewall. 通过Windows防火墙允许应用或功能。
  3. Enable Domain Privilege for Windows Management Instrumentation(WMI) . Windows Management Instrumentation(WMI)启用域特权。

There are some other things also that you can check. 您还可以检查其他一些内容。

  1. The remote computer is blocked by the firewall. 远程计算机被防火墙阻止。
    Solution: Open the Group Policy Object Editor snap-in (gpedit.msc) to edit the Group Policy object (GPO) that is used to manage Windows Firewall settings in your organization. 解决方案:打开“组策略对象编辑器”管理单元(gpedit.msc)以编辑用于管理组织中Windows防火墙设置的Group Policy object (GPO) Open Computer Configuration, open Administrative Templates, open Network, open Network Connections, open Windows Firewall, and then open either Domain Profile or Standard Profile, depending on which profile you want to configure. 打开计算机配置,打开管理模板,打开网络,打开网络连接,打开Windows防火墙,然后打开域配置文件或标准配置文件,具体取决于您要配置的配置文件。 Enable the following exception: Allow Remote Administration Exception and Allow File and Printer Sharing Exception . 启用以下异常: Allow Remote Administration ExceptionAllow File and Printer Sharing Exception
  2. Host name or IP address is wrong or the remote computer is shutdown. 主机名或IP地址错误或远程计算机已关闭。
    Solution: Verify correct host name or IP address. 解决方案:验证正确的主机名或IP地址。
  3. The "TCP/IP NetBIOS Helper" service isn't running. “ TCP / IP NetBIOS Helper”服务未运行。
    Solution: Verity that "TCP/IP NetBIOS Helper" is running and set to auto start after restart. 解决方案:验证“ TCP / IP NetBIOS Helper”是否正在运行,并将其设置为重新启动后自动启动。
  4. The "Remote Procedure Call (RPC)" service is not running on the remote computer. 远程计算机上未运行“远程过程调用(RPC)”服务。
    Solution: Open services.msc using Windows Run. 解决方案:使用Windows Run打开services.msc In Windows Services, Verify that Remote Procedure Call (RPC) is running and set to auto start after restart. 在Windows服务中,验证Remote Procedure Call (RPC)是否正在运行,并将其设置为重新启动后自动启动。
  5. The "Windows Management Instrumentation" service is not running on the remote computer. “ Windows Management Instrumentation”服务未在远程计算机上运行。
    Solution: Open services.msc using Windows Run. 解决方案:使用Windows Run打开services.msc Verity that Windows Management Instrumentation service is running and set to auto start after restart. 验证Windows Management Instrumentation服务正在运行,并设置为重新启动后自动启动。

The error The RPC server is unavailable. (0x800706ba) 错误The RPC server is unavailable. (0x800706ba) The RPC server is unavailable. (0x800706ba) can occur when Windows Firewall (or any other firewall) blocks WMI connection. Windows防火墙(或任何其他防火墙)阻止WMI连接时,可能会出现The RPC server is unavailable. (0x800706ba) See Connecting Through Windows Firewall and related articles. 请参阅通过Windows防火墙连接和相关文章。

The code is running fine when I'm adding domain admin under remote machine's WMI Control remote security property. 当我在远程计算机的WMI控制远程安全属性下添加域管理员时,代码运行良好。 please check below screenshot. 请检查以下屏幕截图。

I doubt that this is really true. 我怀疑这是真的。 When you don't have permission to access WMI you usually get Access is denied error. 当您没有访问WMI的权限时,通常会出现“ Access is denied错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 System.Runtime.InteropServices.COMException(0x800706BA):RPC服务器不可用。 (HRESULT异常:0x800706BA) - System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) WMI:RPC服务器不可用。 (尝试连接到远程计算机时抛出HRESULT异常:0x800706BA) - WMI: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) throws when try to connect to remote machine RPC服务器不可用。 (来自HRESULT的异常:0x800706BA)-Excel - The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) - Excel RPC服务器不可用。 连接到远程计算机时(来自HRESULT的异常:0x800706BA) - The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) when connecting to remote computer 如何处理 System.Runtime.InteropServices.COMException (0x800706BA):RPC 服务器不可用。 (来自 HRESULT 的异常:0x800706BA) - How to handle System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) LDAP 从域外重置密码。网络 C# 错误:RPC 服务器不可用。 (hresult 的异常:0x800706ba) - LDAP reset password from outside the domain network C# Error: RPC server is unavailable. (exception from hresult: 0x800706ba) 如何修复“CCertRequest::Submit:RPC 服务器不可用。0x800706ba”错误? - How to fix "CCertRequest::Submit: The RPC server is unavailable. 0x800706ba" error? 在错误0x800706BA之前捕获RPC锁定 - Catch RPC lock before error 0x800706BA 使用WMI查询“RPC服务器不可用” - “The RPC server is unavailable” using WMI query 请阐明“服务器引发异常。 (来自HRESULT的异常:0x80010105(RPC_E_SERVERFAULT))” - Please clarify the meaning of “The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM