for Vostro machine, WMI connection fails.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DKn
    New Member
    • Aug 2007
    • 53

    #1

    for Vostro machine, WMI connection fails.

    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
    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();
    }
    Please any one give me the solution to this.. i need to fix this.
    Last edited by Curtis Rutland; Jul 18 '08, 01:16 PM. Reason: Added Code Tags - Please use the # button
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    As a full member you should be aware by now that you need to use the [CODE] tags to surround your code blocks. This is not optional. Please use them from now on.

    MODERATOR

    Comment

    Working...