My application requirements are as below. The application will be launched in the domain administration system, which will ping the entire machine under this domain, it will receive data on disks, CPU and RAM of all domain systems.
Whenever I try to ping a car, I get an error message
"The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)"
The code that I use to connect the remote machine,
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();
source share