Author: kezmondo | Posted on: 10/6/2009 9:11:26 AM | Views : 307

Hi,
I'm writing an intranet site allowing users to add/remove network printers to their own machines. I'm using ASP.NET/C# for the pages, and WMI for the printer operations.

All is fine when running on my localhost, but when publishing the site to the server, I get the dreaded Access Denied exception when carrying out the WMI operations.

Firstly, I'd like to make sure what I'm trying to do is actually possible! Can anyone confirm please?

Secondly, if it is possible, can anyone tell me what I need to do to get this working?


Here's what I've got so far: Webpage is set to impersonate and the site in IIS has Windows Authentication enabled and Allow Anonymous Access disabled. The page does indeed display my username correctly using HttpContext.Current.User.Identity.Name In the ConnectionOptions, I've set ImpersonationLevel.Impersonate and Authe ...

Go to the complete details ...