I am having C#.NET windows application, to read the system info from Remote system through WMI.
For Win2003 server machine, the WMI connection is successful.
For the Dell vostro Machines WMI connection is giving the error " RPC server is unavialable. But for the same machines , i am able get data by WMIC commands with the same Administrator credentials. What will be the problem. Firewall is off, RPC server is running.
Here is the code
Please any one give me the solution to this.. i need to fix this.
For Win2003 server machine, the WMI connection is successful.
For the Dell vostro Machines WMI connection is giving the error " RPC server is unavialable. But for the same machines , i am able get data by WMIC commands with the same Administrator credentials. What will be the problem. Firewall is off, RPC server is running.
Here is the code
Code:
ManagementScope wmiMgmtScope = null;
ConnectionOptions connOptions = new ConnectionOptions();
connOptions.Username ="USERNAME";
connOptions.Password ="PASSWORD";
wmiMgmtScope = new ManagementScope("\\\\" + strHost + "\\root\\cimv2", connOptions);
wmiMgmtScope.Options.Impersonation = ImpersonationLevel.Impersonate;
wmiMgmtScope.Options.EnablePrivileges = true;
try
{
wmiMgmtScope.Connect();
}
Comment