WMI

J

Jonas Nilsson

Im trying to read information about clients though a web application. (
Clientdatabase ).

I connect like this, and my user account have permissions to access all
klients in the network.

ManagementObjectSearcher query;
ManagementObjectCollection queryCollection;
System.Management.ObjectQuery oq;
string stringMachineName = "clientName";
ConnectionOptions co = new ConnectionOptions();
co.Username = "";
co.Password = "";
System.Management.ManagementScope ms = new
System.Management.ManagementScope("\\\\" + stringMachineName +
"\\root\\cimv2", co);

But i get an error, because the web app is running as the account "ASP.NET",
"ASP.NET is not authorized to access the requested resource"

How can i get the web app to run as my "client accout".
I have removed the Anonymous login from IIS, and added impersonate="true",
authentication mode="Windows" to web.config.

/Jonas
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top