Monday, July 06, 2009

IIS6 – Network Service username under impersonation

Had a problem on trying to configure IIS6 to run a website under a specified service account.

Setting the account to use the service account as the anonymous credentials and identity impersonate to true in the web.config didn’t get rid of the symptom of the network service account being passed through to a remote SQL Server.

The trick is to set the App Pool to use the service account and adding the service account to the IIS_WPG group on the web server.

Not quite sure how I avoided hitting this problem before but delighted to suss it out!

1 comments:

Kevster said...

aspnet_regiis.exe -ga [service_account] is your friend :)