473,402 Members | 2,064 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 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 5873

"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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.