It seems to be quite easy to end up with a dodgy IIS installation, especially if you install IIS after the .net framework. If you are using Visual Studio it will probably complain and then tell you how to fix it if you ask for help. Today I didn’t have that luxury and I got the following error in my eventlog, “Failed to initialize the AppDomain:/LM/W3SVC/1/ROOT”.
In order to fix it you simply need to use the aspnet_regiis -i command while in the ASP.Net directory. This is usually $WINNT\Microsoft.Net\Framework\v\. Run this command while the web server is stopped.
If you have never had the IIS running your .net application and you are seeing lots of strange error messages this could fix it.