Urgent

Y

Yoshitha

HI
Am trying to retrieve the cpuid of the system from web application and am
geting the followng exception can anybody tell me how to solve this problem
its very urgent for me

i got error in the follwoing line of code

Dim moc As ManagementObjectCollection = mc.GetInstances()



Exception Details:

System.Management.ManagementException: Access denied Source Error:
Line 105: Dim temp As String = String.Empty Line 106: Dim mc
As ManagementClass = New ManagementClass("Win32_Processor") Line 107:
Dim moc As ManagementObjectCollection = mc.GetInstances() Line 108:
Dim mo As ManagementObject Line 109: For Each mo In moc Line 105:
Dim temp As String = String.Empty Line 106: Dim mc As ManagementClass
= New ManagementClass("Win32_Processor") Line 107: Dim moc As
ManagementObjectCollection = mc.GetInstances() Line 108: Dim mo As
ManagementObject Line 109: For Each mo In moc Line 105: Dim


thanx in advance
yoshitha
 
J

Jon Skeet [C# MVP]

Yoshitha said:
Am trying to retrieve the cpuid of the system from web application and am
geting the followng exception can anybody tell me how to solve this problem
its very urgent for me

i got error in the follwoing line of code

Dim moc As ManagementObjectCollection = mc.GetInstances()

ASP.NET runs (by default) under a fairly limited account. It looks like
you need to give it access to WMI.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top