Remote WMI Connection issue


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Remote WMI Connection issue

  1. #1
    Join Date
    May 2005
    Posts
    25

    Cool Remote WMI Connection issue

    i needed to get the free disk space on a shared remote drive.
    my shared-name goes something like this -- \\RemoteServer\ADrive$

    ConnectionOptions oConn = new ConnectionOptions();
    oConn.Username = "xUser";
    oConn.Password = "xxxx";
    string sSrvName = @" \\RemoteServer\ADrive$";

    ManagementScope oMS = new ManagementScope(sSrvName, oConn);

    I get the error - "Invalid Parameter".
    If i remove the $ sign from the end of the server name and make it something like \\RemoteServer\ADrive
    it goes past the above statement and fails at
    ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(oMS, oQuery) ;
    ManagementObjectCollection oReturnCollection = oSearcher.Get() ;

    with the error - "RPC server is unavailable"

    but when trying to map the above mentioned share drive - \\RemoteServer\ADrive$, via Windows Explorer it works.
    any kind of help is appreciated.

    thanks to all

  2. #2
    Join Date
    Jul 2009
    Posts
    1

    Solving WMI remote problems

    Getting WMI to work remotely has wasted hours of time but if you have dont the necessary DCOM configurations there things that nearly always leads to the WMI remote server not availalbe messsage and number one is the firewall.
    This isn't easy to solve because of the way DCOM uses a range of ports that keep moving!
    Check out Getting remote WMI to work for a much longer account.
    mikej

Similar Threads

  1. WMI Remote Connection
    By pradeep455 in forum ASP.NET
    Replies: 0
    Last Post: 02-04-2009, 11:05 PM
  2. Remote Connection using TCP
    By kundenarchana in forum .NET
    Replies: 1
    Last Post: 01-14-2009, 03:45 PM
  3. Remote Connection using TCP Issue
    By kundenarchana in forum .NET
    Replies: 1
    Last Post: 01-07-2009, 10:34 AM
  4. Replies: 5
    Last Post: 02-06-2006, 11:58 AM
  5. Replies: 1
    Last Post: 04-01-2005, 08:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center