473,597 Members | 2,342 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 5925

"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
3610
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 just fine.
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
5112
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, VB 2005 reports:
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 namespace.
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 Number of the CPU and Operating System from examples I have found like:
7
6717
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 to locate it?
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 ROOT.CIMV2.Win32 namespace. They are not listed in Intellisense
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
7886
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8272
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8381
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8035
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8258
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6688
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5431
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1494
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1238
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.