I've installed web applications on various IIS versions on different Windows platforms and I always find some task to be annoying. Here are some common issues and how to get it resolved. This post is specific to IIS 6 and Windows 8. I will keep this post up to date as possible as I encounter or think about them.
- By default, if you're using an App Pool that is set to
ApplicationPoolIdentityas the process model identity, you will get an error if your connection string is set to
IntegratedSecurity=true. This means that the authentication is tied to the local credentials.
a.) Set it to
falseand configure/grant an actual user to connect to your local SQL Database instance. This can be configured in SQL Server Management Studio (SSMS).
b.) Set the
process model identityin the Application Pool, instead of built-in account to a
custom accountusing your Windows credentials.
- If you're getting a 401 (unauthorized access) to static resources (CSS, JS, etc.), this means that the default account for IIS doesn't have the permission to read these files.
a.) You can go to IIS manager and select the website and go to the
Authentication > Anonymous Authenticationand make sure that it's enabled (at a minimum, it needs to be enabled) AND set to a user that has permission. By default, it uses
IUSRfor permitting anonymous access.
b.) You can also go to the website project itself in your local directory and add
IUSRto the list of accounts that are permitted to read the website directory. Right click on the project and
Properties > Security > Edit. By going with this approach, you can keep the anonymous authentication to the
Application pool identitysince the permission is given or set to the built-in user account.
- In Windows 8, the command
aspnet_regiis -idoesn't work anymore so if you don't have ASP.NET 4.x installed, adding it can be accomplished by going to the
Programs and Features > Turn Windows features on or offthen look for ASP.NET 4.x. Feel free to refer to this article for more information about this.
Feel free to comment or offer some insight if you find this post valuable or have encountered issues outside of what I highlighted in this post.