HighTechTalks DotNet Forums  

ManagementScope.Connect is slow

Dotnet Framework (WMI) microsoft.public.dotnet.framework.wmi


Discuss ManagementScope.Connect is slow in the Dotnet Framework (WMI) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
John
 
Posts: n/a

Default ManagementScope.Connect is slow - 10-11-2007 , 04:58 PM







When I issue a call to connect to the WMI scope using
ManagementScope.Connect method, it takes about 10 seconds to complete.
Subsequent requests are much quicker. Our network does not seem to be the
problem, atleast that's what I have been told. What could be causing this
long pause while it is trying to connect to the server.

Below is a snippet of my code:

oConn = new ConnectionOptions();
oConn.Username = ServerName + @"\" + UserName;
oConn.Password = Password;
oConn.Impersonation = ImpersonationLevel.Impersonate;
mScope = new ManagementScope((@"\\" + ServerName + @"\root\cimv2"), oConn);

try
{
mScope.Connect(); // Takes a while to complete
}
.......





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.