Take the 2-minute tour ×

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.

share|improve this question
How are you hosting your service? –  Yossi Dahan Jan 13 '09 at 15:20
add comment

2 Answers

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.

share|improve this answer
Of course, it goes without saying that running the IIS process under an administrator account is an abysmally bad idea. –  casperOne Jan 13 '09 at 20:07
add comment

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

share|improve this answer
add comment

Your Answer


