471,325 Members | 1,491 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,325 software developers and data experts.

System.Management namespace

I am using VS.Net 2000 and C# trying to access the System.Management
namespace in a Web Application -but- after:
using System;
using System.Management;
I get:
The type or namespace name "Management" does not exist in the class or
namespace "System"
How do I go about accessing the "Management" namespace...
I am trying to get the Serial Number of the CPU and Operating System from
examples I have found like:
//ManagementObjectSearcher searcher = new
//ManagementObjectSearcher("select * from win32_share");
//string MgmtTemp;
//foreach (ManagementObject share in searcher.Get())
// {
// // Console.WriteLine("Share = " + share["Name"]);
// MgmtTemp = share["Name"];
// }
There seems to be different limitations between Windows Applications "Forms"
and Web Applications - Why - aren't they both using the .Net
Framework/Runtime???
Thanks in advance,
Paul

Jul 21 '05 #1
1 5571

"PaulThomas" <Pa********@discussions.microsoft.com> wrote in message
news:F5**********************************@microsof t.com...
I am using VS.Net 2000 and C# trying to access the System.Management
namespace in a Web Application -but- after:
using System;
using System.Management;
I get:
The type or namespace name "Management" does not exist in the class or
namespace "System"
How do I go about accessing the "Management" namespace...
I am trying to get the Serial Number of the CPU and Operating System from
examples I have found like:
//ManagementObjectSearcher searcher = new
//ManagementObjectSearcher("select * from win32_share");
//string MgmtTemp;
//foreach (ManagementObject share in searcher.Get())
// {
// // Console.WriteLine("Share = " + share["Name"]);
// MgmtTemp = share["Name"];
// }
There seems to be different limitations between Windows Applications
"Forms"
and Web Applications - Why - aren't they both using the .Net
Framework/Runtime???
Thanks in advance,
Paul


There are no "different limitations", for both you have to add a reference
to the System.Management.dll. assembly when compiling.
VS will automatically add following entry to your web config file when you
add an assembly reference...

<assemblies>

<add assembly="System.Management, Version=....."/>

Willy.

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Jonny | last post: by
5 posts views Thread by Bernie Yaeger | last post: by
1 post views Thread by PaulThomas | last post: by
7 posts views Thread by eric | last post: by
3 posts views Thread by Marco Shaw | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.