Hello,
I am using a ManagementObjectSearcher in an ASP.NET web app (C#) to perform a WMI query on the local machine. Basically, my application uses FormsAuthenticaiton to authenticate users. I assigned an admin account in IIS for anonymous access (for debugging) and the aspnet worker process is using the networkservice account. The user is logged in and then the query is executed. I pass it the following:
scope: \\localhost\root\cimv2
query: "select * from win32_printjob"
I call "get" on the ManagementObjectSearcher and only certain jobs are returned. However, if I reinstall all the printers and then print jobs and log into my app, all the jobs will appear. So from the moment I install my app, no jobs will appear until I reinstall the printers.
Now, I had a previous version of this that worked just fine, ALL THAT I CHANGED was I made the the scope < ...
Go to the complete details ...