473,761 Members | 8,372 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Execption while using System.Manageme nt Classes

Hi,

I am getting this exception

Unhandled Exception: System.Manageme nt.ManagementEx ception: COM object that
has been separated from its underlying RCW can not be used. --->
System.Runtime. InteropServices .InvalidC
omObjectExcepti on: COM object that has been separated from its underlying
RCW can not be used.
at System.Manageme nt.IEnumWbemCla ssObject.Clone_ (IEnumWbemClass Object&
ppEnum)
at System.Manageme nt.ManagementOb jectCollection. GetEnumerator()
--- End of inner exception stack trace ---
at System.Manageme nt.ManagementEx ception.ThrowWi thExtendedInfo( Exception
e)
at System.Manageme nt.ManagementOb jectCollection. GetEnumerator()
at frs2.frsverifie r.RemoteService Controller.Regi steredServices( ) in
e:\SDTSTLH\test src\basetest\Co re_File_Service s\FRS\FRSv2\Ver ifier\FrsVerifi e
r.cs:line 234
at frs2.frsverifie r.FrsVerifier.M ain(String[] args) in
e:\SDTSTLH\test src\basetest\Co re_File_Service s\FRS\FRSv2\Ver ifier\FrsVerifi e
r.cs:line 36

Any ideas what may be causing this. I am trying to use the enumerator of
ManagementObjec tCollection.

Kind Regards

--
Masood Siddiqi [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights
Nov 15 '05 #1
0 1224

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4566
by: John Lucas | last post by:
I have been reading many of the posts about determining which network card to use (in a machine with multiple nics), and determining whether or not that card is active. I'm hoping this will help others who are struggling with the same issues. This info exists in the groups, but not all in the same place. Thanks to everyone who contributes. Well done! Consider the following code:
26
448
by: codymanix | last post by:
Last night I had several thought about RAII and want to discuss a bit. Why doesn't CSharp support destructors in structs? Wouldn't that make RAII possible like in C++? When the struct goes out of scope, the dtor could be immediately be called (no GC needed). For that, you don't have to declare the whole File class as a struct (which would be not good for performance when File has a lot of data-members). Instead creating a thin wrapper...
2
14045
by: Paul Gronka | last post by:
I've got a VB.NET windows application (written in VS .NET 2003) that makes a call to WMI for retrieving the MAC Address from the client's PC. It works on 4 out of the 5 PC's tested so far. All the workstations are DELLs running XP SP1a with the 1.1 .NET Framework. The following line of code generates an exception on the one PC: Dim oMac As New System.Management.ManagementClass("Win32_NetworkAdapterConfiguration") The error it...
3
3190
by: Ken Kolda | last post by:
I have a .NET assembly which utilizes the System.Management classes to retrieve information about the computer. When run under ASP.NET, I can use this assembly with no problems. But now I'm trying to use with from within classic ASP. The assembly is strongly-named and I've registered it using "regasm /codebase" (I've also tried it in the GAC without the /codebase). But when I use the component in ASP thru COM interop on either Win 2K or Win...
1
6843
by: Bill | last post by:
As I have looked all over, even MSDN, I cannot find much on iis management using wmi in c#. Does anyone have sample code or any documentation. If so please email to me bduffy@no.spam@4duffy.com remove no.spam@ of course --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com).
2
11415
by: Brian Worth | last post by:
I have just upgraded from VB 4.0 to VB .NET 2002. One program under VB 4.0 was able to shut down or restart the (windows XP) machine using a series of API calls. (Getlasterror, GetCurrentProcess, OpenProcessToken, LookupPrivilegeValue, AdjustTokenPrivilegese, ExitWindowsEx. I am trying to avoid using any API calls if possible and to use managed code instead. I couldn't find any easy way of doing this but searching the Internet with...
4
2862
by: moondaddy | last post by:
I installed the exception management block on my computer and it defaulted to: C:\Program Files\Microsoft Application Blocks for .NET\Exception Management\Code\VB\ Now I want to make a copy of that project in a different location where I can experiment with customizing it while leaving the original project safe and intact. So I copied everything to its new location OK, but now I need to run: Installutil.exe...
1
1882
by: Anonieko | last post by:
Logging To a File In A S P . N E T 2 . 0 . I also want weekly rolling filename for the log file. Step 1. Create a class library ( 2 classes) ============================== AppWebEvent.cs -------------- using System; using System.Web.Management;
6
4568
by: =?Utf-8?B?QnJhc3NpY2FOaWdyYQ==?= | last post by:
Greetings, I have a web application that prints a form using PrintDocument on the server. Currently it is set up to print to the default printer (on the server). My users would like to be able to select the printer (there are several on the network that the server can use). How can I bring up a print dialog box in the client browser that offers the
0
10115
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
9957
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
9905
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
9775
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
8780
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
6609
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();...
0
5229
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3881
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
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.