Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi,
I am using WMI to access pc information(h/w and s/w both) in my website. On local pc it is working fine, but once i upload on server it is not accessing any information.Please tell me why it is not accessing.

Thank You
Posted
Comments
luisnike19 1-Apr-11 1:36am    
Any exception?

On the server it is running in Internet Zone. You may need to impersonate an user who has necessary privilege for that. But at the first hand why you need to dynamically access the hardware/ software information on the server? You know it, the server details unless it is going to change everyday. Leaving your application access sensitive information is a security hole.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 1-Apr-11 3:13am    
This is the real reason for the difference. My 5. Security.

Speaking of which: see this post (and my "Answer" of course): http://www.codeproject.com/Answers/175616/WARNING-Black-Line-of-Death-in-windows-phone-7.aspx

Did't you forget it's 1st of April today?! :-)
--SA
Albin Abel 1-Apr-11 3:36am    
laugh :) :). I read your answer.
It doesn't work because the account your website is running under (ASPNET) does not have any permissions at all to the client machine in question.

Unless you web server and client machines are all in the same Domain (Active Directory), you have no hope of pulling this off.

If they ARE in the same domain, the web application would have to run under an account that has enough permissions to the WMI objects your using on the client machine. This is usually a "Domain User" account or better.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900