Changing the user IIS runs as Windows 2008 IIS 7.5

Back in the (good?) old days, it was easy to change the user IIS ran as through the services console you could pick anyone you wanted.

You might need to do this for a variety of reasons, access to remote services, file systems or for other reasons.

However with windows 2008 and IIS 7 / 7.5 you can no longer run the World Wide Web service as a different user without a whole world of pain..

For most people there is a fairly simple way to resolve this – in IIS 7.5 now the ApplicationPools are what fire up the specific workers for the w3wp process, and as such its very simple to change the user that the w3wp process runs as.

Open IIS management console and expand your website tree.

Click on Application Pools, and in the right hand pane you should see the DefaultAppPool – you will also see the user or Identidy that this is currently running as.

To change this to a different user simply right click the DefaultAppPool and select Advanced settings, then under the process model section click the identity name and click the elipses (the 3 dots) you will then be prompted which user account you wish to use.

If you want to use IIS to pass authentication through to a non domain machine then still in advanced settings you will also need to change the option for LoadProfile to true – this allows you to pull the credentials that get cached in cmdkey should you need it (see my other post on cmdkey).

Once you have done this, right click the DefaultAppPool and choose recycle for good measure which restarts the w3wp process.

You should now see it in task manager process list running as your defined user, and hopefully have access to all the resources you needed.

You can follow any responses to this entry through the RSS 2.0 feed.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This blog is kept spam free by WP-SpamFree.