473,511 Members | 15,046 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5893

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3606
by: Jerry | last post by:
I have an existing C++ Wmi App developed with v6.0 that I am now converting to C#. To do so I need FCL Namespace System.Management but "Using System.Management;" bombs out with a build error...
2
4450
by: Jonny | last post by:
How do I display the system RAM in C# ?? Do I have to get it from the Registry or is there a function for it? If so how?? Thanks /Jonny
5
5629
by: Bernie Yaeger | last post by:
In a different thread, I was told to look at the system.management namespace. When I tried to import it, my system does not show that namespace. System is of course there, but not management. Do...
4
5108
by: Dominic Marks | last post by:
Hello All, Hope this is the correct group, here goes: I'm looking into writing a small application to interface with WMI, and downloaded the Express Edition Beta of Visual Basic 2005 to see...
3
14186
by: .NETMystified | last post by:
Windows XP Pro is upto date....just checked I have: Visual Studio.NET 2003 .NET Framework 1.1 .NET Framework (Hotfix) whatever that means...lol. Office 2003 which I just checked....upto date. ...
1
521
by: PaulThomas | last post by:
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...
7
6679
by: eric | last post by:
I'm writing a program in C# and found a couple of threads about how to check the status of a printer before sending it any data, to ensure that the printer is ready to print. They say to include...
2
6446
by: Jason | last post by:
I'm trying to work with the WMI class in the System.Management namespace with Visual Basic.Net. I copied and pasted some example code from Microsoft that contains the following namespace imports: ...
3
16138
by: Marco Shaw | last post by:
I've got some C# code to create a custom PowerShell cmdlet with these statements: .... using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; .... ...
0
7237
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7137
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7417
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7506
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4734
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3219
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
445
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.