Generic failure, wmi

  • Thread starter Thread starter Guest
  • Start date Start date
Hello Anders,

I contacted Mike on it. Mike can't repro it on his side now. We will
discuss to see whether there is any other way to troubleshoot it. This
issue is quite complicated. Anyway, we will get back here in one day.

Thanks very much for your understanding.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as
p&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Anders,

Since I am not able to reproduce your issue with the code snippet you sent
me we may need to open a actual case for the issue since we may need to
look at more of your code.

Perhaps what you can do is just verify that the oSercher.Get is the source
of the delay. Can you add time stamp code in various places in the code. I
would like to see if the Delete() or the Get() is the problem. In addition
you could try to optimize the ManagementObjectSearcher by setting some
options and see if that makes any difference. I suspect it will not
though. For example:

//================================================================
ConnectionOptions oConn = new ConnectionOptions();

ManagementPath path = new ManagementPath();
path.Server = "storage";
path.NamespacePath = "root\\MicrosoftDNS";

ManagementScope scope = new ManagementScope();
scope.Options = oConn;
scope.Path = path;
scope.Connect();

ObjectQuery sQuery = new ObjectQuery();
sQuery.QueryLanguage = "WQL";
sQuery.QueryString = "SELECT * FROM MicrosoftDNS_Zone WHERE ContainerName =
'MikeZone' AND Name='MikeZone'";

EnumerationOptions options = new EnumerationOptions();
options.ReturnImmediately = true;
options.Rewindable = false;
options.EnumerateDeep = false;

ManagementObjectSearcher oSearcher = new ManagementObjectSearcher();
oSearcher.Scope = scope;
oSearcher.Query = sQuery;
oSearcher.Options = options;

ManagementObjectCollection oCollection = oSearcher.Get();
//================================================================

Mike Dutra
Microsoft Developer Support WSH/WMI/Cluster Dev

Disclaimer: This posting is provided "AS IS" with no warranties, and
confers no rights. You assume all risk for your use.
--------------------
 
Back
Top