Author: halcyonetic | Posted on: 12/7/2009 1:52:34 PM | Views : 325

Okay, so I have a class I've written to handle my WMI queries and I instantiate the class in the following manner:
WmiConnection = new ConnectionOptions(); computername = computername + @"\root\cimv2"; WmiScope = new ManagementScope(computername); WmiConnection.Impersonation = ImpersonationLevel.Impersonate;  
and then I run my query with the following method:
public ManagementObjectCollection CustomQuery(string wmiQuery) { var query = new ObjectQuery(wmiQuery); var searcher = new ManagementObjectSearcher(WmiScope, query); return searcher.Get(); }
All this works great, I can query computers (that I have administrator rights to of course) remotely with my AD credentials being impersonated.
When I published my web application to the pre-production server however, I get an System.Un ...

Go to the complete details ...