Link to home
Start Free TrialLog in
Avatar of JT_SIRO
JT_SIRO

asked on

ManagementObject not recognized in asp.net app

I'm trying to use the ManagementObject object to get information about my servers hard drive.  I added the namespace using System.Management;  But it still errors saying:
Error      11      The type or namespace name 'ManagementObject' could not be found (are you missing a using directive or an assembly reference?)      C:\Documents and Settings\Administrator\Desktop\SH_Source\Admin_Pages\Home.aspx.cs      92      1      C:\...\SH_Source\

It almost seems like my .NET framework doesn't include it, but it should I'd think.  Any ideas?
Avatar of kaufmed
kaufmed
Flag of United States of America image

Are you sure you have a reference added to "System.Management"? Just because the namespace is available, doesn't mean you're looking at the one you intend  = )
ASKER CERTIFIED SOLUTION
Avatar of jijeesh
jijeesh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JT_SIRO
JT_SIRO

ASKER

I have: using System.Management;  in my code so I'd think it'd work.
Is that what you meant by adding a reference to System.Management dll?  Or do I make the reference in a config file or something?

Here's the line of code that fails:
ManagementObject disk = new
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial