views:

831

answers:

3

Hi,

How can I configure my WCF service to run under the administrator account? (this is not for production, just testing).

Is it simply a web.config tweak?

IIS 7 hosted WCF service.

+1  A: 

If you are hosting it as an ASP.NET service, you should run IIS process as the administrator account. If you are hosting it under a Windows service, you should configure it to run as an administrator.

Mehrdad Afshari
Of course, it goes without saying that running the IIS process under an administrator account is an abysmally bad idea.
casperOne
+1  A: 

under IIS 7 make sure the service runs under an application pool configured to run under the desired user.

Yossi Dahan
A: 

Even with the app pool running as the desired user I still dont seem to have all the permissions of the user.

I'm trying to access sc.exe, but I get back error 5