Windows 7 /Windows 2008 R2 cross application pool isolation
Posted by DusanMay 16
Windows 7 and Windows 2008 R2 both run IIS 7.5. Whilst this version is similar to previous versions, if you wish to use it to host a DotNetNuke instance, there has been a change in the default identity used for the asp.net user.
Why the changed account?
The reason for this is that it’s possible for a website running under 1 application pool operating under an identity (e.g. “networkservice”) to use filesystem objects to read files from another site running in a different app pool that also uses “networkservice”. This meant that to get true app-pool isolation, admins had to create multiple users (and ACL them accordingly).
In IIS 7.5 (the version in Win7), the “ApplicationPoolIdentity” add’s an additional SID per app pool (and injects the name of the pool into it). This protects this cross-pool weakness, and allows servers to run under multiple app pools all with the same user (and also usefully injects the name of the process alongside w3wp.exe)
If you’re interested there’s more details on this @ http://blogs.iis.net/webtopics/archive/2009/03/13/changes-to-application-pool-identities-in-iis-7-5-beta.aspx and http://learn.iis.net/page.aspx/624/application-pool-identities/
However, the main point of this blog is to show you how to use this new account, as setting it’s permissions is not exactly intuitive.
New account for asp.net
Instead of using the “NetworkService” account that was used in IIS6/7 , the default account is called “ApplicationPoolIdentity” , so this is the account that needs the usual permissions on the website. This account is not a “real” user account though. To add permissions for it on your website, you will need to open up Windows explorer and do the following:
- Right click the website folder and select “Properties”
- Select the “Security” tab
- Click the “Edit” and then “Add” button
- Click the “Locations” button and make sure you select your machine.
- Enter “IIS AppPool\DefaultAppPool” in the “Enter the object names to select:” text box.
- Click the “Check Names” button and click “OK”.
- You can now select the necessary permissions (typically read, write and modify permissions for the folder and all subfolders is the easiest permission to set)
Note: Alternatively you may change your application pool back to “NetworkService” (or any other account), but will lose the cross-app pool isolation feature.
