.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

ManagementObject

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :.NET Framework
 

Hi,

the following code throwing an exception on the bolded statement only at one client of many which executed just fine.
The Exception is FileNotFoundExeption at Marshal.ThrowExceptionForHRInternal.


ManagementObject
mo = new ManagementObject("win32_process.handle='" + Process.GetCurrentProcess().Id.ToString() + "'");


any idea how to solve it?

mo.Get();


View Complete Post


More Related Resource Links

Visual Studio 2010, I cannot find the "ManagementObject".

  
Hi I want to get the seriel number of the local hardrive, now I know some people are going to say this is not possible and client side vs server side, But i read this post and it seems this person got it to work. http://forums.asp.net/t/46697.aspx Now when I try and implement this in Visual Studio 2010, I cannot find the "ManagementObject". I am using the System.Management; in my code as you can see. All I want to do is get the c: drive seriel number when my app is loaded in the browser of that computer. The code below gets the PC NAME and the MAC ADDRESS, all I need now is the c:\ drive seriel number.using System; using System.Management; using System.Net; using System.Collections; using System.Collections.Specialized; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace Blueprints.PC_Name_MacAddress { public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //get the computer name string pc_name = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName; //get the computers mac address string mac_addr = GetMACAddress(); //print the pc name and mac address to the screen Response.Write("pc_name :- &q
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend