IIS Express Default Settings

On occasion when I open a Web application in Visual Studio, I receive a message that is similar to the following:

image So that the search bots can find the text, the pertinent portion reads “The following settings were applied to the project based on settings for the local instance of IIS Express”.

The message basically says that the settings on the Web application with respect to authentication don’t match the default settings in your local IIS Express. So Visual Studio, to make sure that the project can be deployed, changes the Web application settings. Now there are many cases where this is not desirable and the message nicely tells you how to change it back. What is hard to find out is how to change the default settings for IIS Express.

If you go through the “normal” steps, your first thought might be to check out IIS Express itself. But even if you change the settings for the Default Web Site (or any other Web Site you have defined), that’s not good enough.

Instead, you need to modify the ApplicationHost.Config file. You will find it in your My Documents directory under IISExpress/Config. In that file, there is an <authentication> section that determines whether each of the different authentication providers is enabled or disabled. If you modify this file to match your Web application’s requirements, you will no longer get that annoying dialog box popping every time your load your Solution. Of course, you *might* have to changed it for different projects, that’s just the way it goes.