ROOT.CIMV2.Win32.Product spurrious error, how to fix?
ROOT.CIMV2.Win32.Product spurrious error, how to fix?
am 18.12.2007 23:30:00 von mmodrall
Hi...
We have some code written in C# that's trying to manage a farm of servers.
It's using the WMI classes to look at the remote machine for certain
installed packages, and occasionally it blows up but I can't figure out why.
The code is
ManagementScope scope = new
ManagementScope(string.Format(@"\\{0}\root\cimv2", serverName));
scope.Connect();
foreach (Product product in ROOT.CIMV2.Win32.Product.GetInstances(scope))
{
....
}
It blows up on the MoveNext() on the enumerator sometimes but it comes and
goes.
I didn't find anything in the extended info on the ManagementException that
seemed to make it any clearer. That comes out as
OVERRIDABLE="false" TOINSTANCE="true">TRUE
__NotifyStatus
TYPE="sint32">5
TYPE="string">__NotifyStatus
TYPE="string">__NotifyStatus
TYPE="string">__ExtendedStatus
TYPE="sint32">2
PROPAGATED="true" TYPE="string">
TOINSTANCE="true">string
TOINSTANCE="true">string
ExecQuery
TOINSTANCE="true">string
select * from Win32_Product
TOINSTANCE="true">string
WinMgmt
TYPE="uint32">
TOINSTANCE="true">uint32
Any pointers on how to determine the cause and make it go away?
Thanks
Mark
RE: ROOT.CIMV2.Win32.Product spurrious error, how to fix?
am 19.12.2007 11:09:32 von jetan
Hi Mark,
What do you mean in details of code "blows up"? Do you get any exception or
crash with the code? If so, can you provide the exception details and call
stack for analysis?
Thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/de fault.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx .
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
RE: ROOT.CIMV2.Win32.Product spurrious error, how to fix?
am 19.12.2007 15:37:00 von mmodrall
Hi Jeffrey...
The exception data provided is all I've got. The code is throwing an
exception in the MoveNext() iterator of the code snippet provided. The
exception is a ManagementException (ThrowWithExtendedInfo). There are no
nested exceptions, and the ManagementException ErrorInfo is in the original
post. Unfortunately, I didn't see anything particularly helpful in that
either.
Thanks
Mark
""Jeffrey Tan[MSFT]"" wrote:
> Hi Mark,
>
> What do you mean in details of code "blows up"? Do you get any exception or
> crash with the code? If so, can you provide the exception details and call
> stack for analysis?
>
> Thanks.
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Community Support
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/de fault.aspx#notif
> ications.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx .
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
RE: ROOT.CIMV2.Win32.Product spurrious error, how to fix?
am 20.12.2007 10:25:21 von jetan
Hi Mark,
Sorry but where do you get this information? Do you get it under VS2005
debugger or without debugging? Why did you get it as XML format type?
I have never seen this xml format exception info before, and it is hard to
read from it.
Also, is it possible to obtain the stack trace of this exception? It is
better if you can break in the first chance notification of
ManagementException and get the stack trace.
Finally, can you provide a little sample project to help me reproduce this
problem locally? Without reproducing the problem, it is hard to guess the
root cause.
Thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
RE: ROOT.CIMV2.Win32.Product spurrious error, how to fix?
am 20.12.2007 15:47:00 von mmodrall
Hi Jeffrey...
Would there be another forum that would be more appropriate for questions
with the System.Management and/or the ROOT.CIMV2 namespaces? Documentation
seems scarce and it's even harder to find much discussion going on with
Google.
The xml was produced with System.Management.ManagementBaseObject.GetText().
The format I used was System.Managment.TextFormat.CimDtd20. Since I was
using the ROOT.CIMV2 classes when it threw the exception, it seemed like as
good a choice as any. All the output formats seemed to be one form of xml or
another.
http://msdn2.microsoft.com/en-us/library/system.management.m anagementbaseobject.gettext(VS.80).aspx
http://msdn2.microsoft.com/en-us/library/h1s735k3(VS.80).asp x
It's awkward to get the repro at the moment; it only happens when someone
with domain admin privileges attempts to enumerate the installed products on
a remote box that last had something installed by a different admin. The
other admins aren't in today because of the snow.
The System.Management.ManagementException is thrown from the MoveNext()
function of the enumerator through a ROOT.CIMV2.Win32.ProductCollection (a
namespace for which I can find no documentation at all). This is in the
foreach line of the code snippet I sent you.
The error handler I wrote, tore the whole exception apart. It output all
the nested exceptions, all the Exception.Data collections, everything. There
wasn't any. The only info about the exception is that clump of xml from the
System.Management.ManagementException.
But it didn't tell me anything about the cause of the exception much less
what to do about it. If it doesn't mean anything to you either, perhaps you
can ask if there is a forum somewhere for these hierarchies? I looked in the
usenet list and didn't see anything that looked appropriate.
Thanks
Mark
""Jeffrey Tan[MSFT]"" wrote:
> Hi Mark,
>
> Sorry but where do you get this information? Do you get it under VS2005
> debugger or without debugging? Why did you get it as XML format type?
>
> I have never seen this xml format exception info before, and it is hard to
> read from it.
>
> Also, is it possible to obtain the stack trace of this exception? It is
> better if you can break in the first chance notification of
> ManagementException and get the stack trace.
>
> Finally, can you provide a little sample project to help me reproduce this
> problem locally? Without reproducing the problem, it is hard to guess the
> root cause.
>
> Thanks.
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Community Support
>
>
RE: ROOT.CIMV2.Win32.Product spurrious error, how to fix?
am 21.12.2007 04:48:33 von jetan
Hi Mark,
Thanks for your feedback.
Without reproducing this problem, it is hard to analysis it. Since this is
a WMI issue, microsoft.public.win32.programmer.wmi is dedicated for this
topic. But, I am the support engineer of that newsgroup and I would not
expect you will get much help there with the current information.
Regarding the current situation, I would recommend you to contact Microsoft
CSS for a case support; the case support engineer may help you to perform
some remote debugging on your problematic machine.
You can contact Microsoft CSS at 1-(800)936-5800 or by choosing one of the
options listed at:
http://www.microsoft.com/services/microsoftservices/srv_supp ort.mspx
Thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
RE: ROOT.CIMV2.Win32.Product spurrious error, how to fix?
am 21.12.2007 15:29:00 von mmodrall
Hi Jeffrey...
I can reproduce the problem; it's just awkward and I can't do it in a
debugger. I have already given you all the information I get when the
exception happens, every scrap of it. The problem is that this subsystem
doesn't give much information on exception and the documentation is abyssmal
(non-existent for the ROOT.CIMV2 namespace).
I'll try posting the question on win32.programmer.wmi first in hopes that
someone else there may recognize some of the symptoms, then maybe take it to
a support case.
Thanks
Mark
""Jeffrey Tan[MSFT]"" wrote:
> Hi Mark,
>
> Thanks for your feedback.
>
> Without reproducing this problem, it is hard to analysis it. Since this is
> a WMI issue, microsoft.public.win32.programmer.wmi is dedicated for this
> topic. But, I am the support engineer of that newsgroup and I would not
> expect you will get much help there with the current information.
>
> Regarding the current situation, I would recommend you to contact Microsoft
> CSS for a case support; the case support engineer may help you to perform
> some remote debugging on your problematic machine.
>
> You can contact Microsoft CSS at 1-(800)936-5800 or by choosing one of the
> options listed at:
> http://www.microsoft.com/services/microsoftservices/srv_supp ort.mspx
>
> Thanks.
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Community Support
>
>