Troubleshooting IIS / ASP.NET

Internet Information Server (IIS) with ASP.NET is a terrific setup for quick and dirty intranet applications.


However, there's a good chance that, at some point, the server will just fail to start or produce obscure error messages when trying to access ASP pages. Often this seems to be related to security settings or directory permissions, but from time to time it just seems to happen after a windows update or just after rebooting the matchine…


The MSDN knowledgebase and troubleshooting database features a large number of pages dedicated to fixing individual issues, but I haven't been able to find any solution that explains the reason why these problems are occuring or offers a big picture approach to diagnosing and fixing them.


Below is a a list of steps to attempt when running into problems with ASP.NET (2.0) on IIS (6) that worked for me:


Repair ASP.NET

Running aspnet_regiis.exe in the framework directory with the -i (install) option to reinstall / repair ASP.Net seems to fix problems related to ACLS, Metabase access or security settings in 90% of all cases.

%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i. 

In particular, this fixed the following problems for me (even though the MSDN library listed different solutions that all failed to work)