This is my third post with this title. What started as quick command line fix has grown into something huge, including top numbers of hits and comments here on Codebetter. So it’s worth continuing. An asp.net 1.1 installation on IIS can get broken resulting in the error message in the title. When you’re lucky a fix can be done in a couple of seconds from the command line, as described in my first shot. This post was the start of an enormous discussion, making me wandering about a wiki. My second post was a round up of all comments and suggestions, which reached as far as reinstalling Windows itself. Which is another wiki by now. (You can do that on msdn these days)
The main problem in a lot of scenarios are the security settings. In this post I’ll discuss these in more detail.
When developing web applications there are two users which are important. First there is the aspnet machine account. This is the account under which an application runs in the IIS web server. The account is pretty restricted, to prevent as much damage as possible in case the app is compromised. The other account is the VS developers group. You, working in Visual Studio, are part of that group.
<Update november 2009>This post deals with older VS versions which rely on IIS. The screenshots have been recreated, they deal with VS 2003</update>
The security setting on the wwwroot directory are crucial. For the share
VS developpers need full control here. To create a new web app for instance.
The security settings for the directory itself: the ASP.NET machine account needs the right to read, execute and list the folder’s contents.
<update note>In the (recreated) image the rights are set on all users. The user asp.net user is the important one</update note>
The Visual Studio developers groups needs a more complicated set of rights. To set these click the advanced button and select the VS developers in the advanced security settings dialog.
Check allow for every entry except Full control, take ownership and change permissions.
Having done all this you and your web server should have the rights necessary to build apps again.
Some people reported problems with COM+, the DTC and IIS. I cannot check this but bet you another blogpost there is a related solution for that. Of course you can reinstall everything but I think the only essential part in the installation script is setting the permissions right. Doing that by hand is faster.