HighTechTalks DotNet Forums  

ManagementObject exception

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


Discuss ManagementObject exception in the Dotnet Framework (WMI) forum.



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

Default ManagementObject exception - 01-26-2006 , 05:05 PM






I have two separate VB.NET applications which use a ManagementObject to
query the amount of freespace remaining on local disk drives. Both
applications work fine in my test environments, and in many different
customer deployments.

On one customer's server, however, both of my applications generate an
exception when trying to instantiate the ManagementObject. Here is the
stack trace they end up with:

Unhandled Exception: System.TypeInitializationException: The type
initializer for "System.Management.ManagementPath" threw an exception.
---> System.TypeInitializationException: The type initializer for
"System.Management.MTAHelper" threw an exception. --->
System.Runtime.InteropServices.COMException (0x80131701): Exception
from HRESULT: 0x80131701.
at System.Management.MTAHelper..cctor()
--- End of inner exception stack trace ---
at System.Management.MTAHelper.CreateInMTA(Type type)
at System.Management.ManagementPath.CreateWbemPath(St ring path)
at System.Management.ManagementPath..ctor(String path)
at System.Management.ManagementPath..cctor()
--- End of inner exception stack trace ---
at System.Management.ManagementPath..ctor(String path)
at System.Management.ManagementObject..ctor(String path)

I tried running the wbemtest application on the offending server, and
was able to successfully connect to root\cimv2, query the
Win32_LogicalDisk object, and query the different instances of the
object for their remaining freespace with no problems at all. I'm
guessing this means the .NET framework is to blame on this server.

Is there anything else I can do besides try to uninstall and reinstall
the framework?

Thanks for any help in advance!

--Steve


Reply With Quote
  #2  
Old   
Steve
 
Posts: n/a

Default Re: ManagementObject exception - 02-03-2006 , 01:11 PM






If anybody is curious in the future, the customer was running .NET
Framework version 1.1. Installing the .NET 1.1 Service Pack 1 on the
server appears to have fixed the problem.


Reply With Quote
  #3  
Old   
Puneet Bansal
 
Posts: n/a

Default RE: ManagementObject exception - 12-28-2007 , 01:10 AM



I am also having the same Problem. But i am calling ManagementObjectSearcher() query with framwork 2.0. This same exception is thrown by my application

From http://www.google.co.in/search?q=Sys...hl=en&filter=0

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com

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.