473,585 Members | 2,501 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Manageme nt namespace

I am using VS.Net 2000 and C# trying to access the System.Manageme nt
namespace in a Web Application -but- after:
using System;
using System.Manageme nt;
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:
//ManagementObjec tSearcher searcher = new
//ManagementObjec tSearcher("sele ct * from win32_share");
//string MgmtTemp;
//foreach (ManagementObje ct share in searcher.Get())
// {
// // Console.WriteLi ne("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 5923

"PaulThomas " <Pa********@dis cussions.micros oft.com> wrote in message
news:F5******** *************** ***********@mic rosoft.com...
I am using VS.Net 2000 and C# trying to access the System.Manageme nt
namespace in a Web Application -but- after:
using System;
using System.Manageme nt;
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:
//ManagementObjec tSearcher searcher = new
//ManagementObjec tSearcher("sele ct * from win32_share");
//string MgmtTemp;
//foreach (ManagementObje ct share in searcher.Get())
// {
// // Console.WriteLi ne("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.Manageme nt.dll. assembly when compiling.
VS will automatically add following entry to your web config file when you
add an assembly reference...

<assemblies>

<add assembly="Syste m.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
3609
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 saying "Management does not exist in namespace System". I have all the latest SDKs, am using VS .Net Pro, and my C++ Wmi App (built with v6.0) works...
2
4457
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
5645
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 I have to add something to net framework 1.1? Thanks for any help. Bernie Yaeger
4
5111
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 how feasible it is. I've learnt so far that I need access to the System.Management namespace. In my sample application I can't import this however,...
3
14198
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. I am writing a small VB.NET that should be using some functionality in the System.Management namespace (per MSDN), but Visual Studio can't find the...
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 "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...
7
6716
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 the System.Management namespace. This is where my problem is, I have no System.Management namespace. Could anyone help me locate it or a reference...
2
6455
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: Imports System Imports System.Management Imports ROOT.CIMV2.Win32 Visual Studio does not recognize the System.Management namespace nor the...
3
16152
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; .... My compile fails using csc.exe:
0
7908
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7836
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8336
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5389
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3835
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2343
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 we have to send another system
1
1447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1175
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.