RPC Server Exception
System.Management.ManagementScope ms = new System.Management.ManagementScope("\\\\" + stringMachineName + "\\root\\cimv2", co);
oq = new System.Management.ObjectQuery("SELECT * FROM Win32_processor");
query = new ManagementObjectSearcher(ms, oq);
queryCollection = query.Get();
return queryCollection;
well guys i am trying to access remote system but in doing this some machines give mein following exception
System.interop.Runtime.COmException
RPC SERVER IS unavailable (Exception from Hresult:0x800706BA)
can u help me this how to solve this
JK
Answers
We use a third-party firewall product that I was unaware of. When I configured it to allow my IP address access to the server, my problem went away.
thx,
todd
All Replies
This could have one of many reasons, namely the machine name is wrong etc.
Check out this article.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q224370
JK,
Did you ever get this resolved? I have the same problem...
- no
Make Sure the path and name to the Remote machine is correct and RPC services are running on that.
Yes, I have verified that the RPC and WMI services are running on the remote computer. I am also able to ping the server. I have also verified that the server computer does not have the Microsoft Firewall enabled.
The only thing I am not certain about is that the account I am using is found on a domain server (i.e., local accounts are not being used). Do I have to format the user ID I am passing in a particular way (e.g., domainName\userID)? Do I have to set any of the other properties on the ConnectionOptions class besides user name and password?
I'm at a lost. Any help you can provide would be appreciated.
todd
The domain administrator have complete rights on the computer under that domain, so I think if you are providing correct username, password then it should work, But when I see your exception message it seems that problem is not here with Connection Crednitials.
Anyways Try as much things as possible, See RPC and RCP locator services are up and running on the remote machine.
Best of luck ;-)
One important thing is that try searching google for this error "Hresult:0x800706BA" this will tell you the exact cause of the problem.
Best Regards,
Have a look here:
I hope this will solve your problem:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=239140&SiteID=1
Best Regards and Best of Luck ;-)
- There's no firewall enabled on either machine. Consequently, I don't think this applies.
Hello Jahangir,
The Exceptoin: RPC SERVER IS unavailable (Exception from Hresult:0x800706BA) results from a "wrong" call to Your WMI Provider. Can you post Your connectionoptions (You used as Variable co ).
If You run Your Application locally You may use the following:
System.Management.ManagementScope ms = new System.Management.ManagementScope(\\\\ + "." + "\\root\\cimv2", co);
(I replaced the string Variable which holds the computername with . - it represents the local Computer WMI Provider.
Wolfgang Zerzawy
CleverITS
http://www.cleverits.com
We use a third-party firewall product that I was unaware of. When I configured it to allow my IP address access to the server, my problem went away.
thx,
todd
- This post is pretty old, but it's one of the first google search listings for this error. I get this error when I run a powershell Get-WMIObject against a remote computer. I'm running as domain admin, machine pings, firewall is off and Get-WMIObject USED TO WORK. We installed IIS and .net (v2 in some cases, v3.5 in others).
I found that I now have to use the FQDN as the computername or else I get the RPC error.
So:
Get-WMIObject win32_process -computername "myMachine" <---- Fails with "Exception from HRESULT: 0x800706BA"
Get-WMIObject win32_process -computername "myMachine.mydomain.com" <---- Succeeds - Hi there, just to revive this old post.
I've ensured that RPC, RCP, and both WMI services are running on both Server and Client.
My server (for some reason) cannot perform WMI checks on the Client, whereas my Client can perform checks on my server.
Both are connected via Domain.
Is there any reason why this is happening? Please help!


