IISExpress 8 Cannot read configuration file redirection.config

I'm running Windows Server 2008 R2 (x64) with IISExpress8 and when navigating to

c:\Program Files (x86)\IIS Express>iisexpress.exe

it says:

Filename: redirection.config

Error: Cannot read configuration file

Any ideas where to start? I can't find anything...


Solution 1:

I had a similar issue to @Myles J but renaming %userprofile%\Documents\IISExpress\config\applicationhost.config didn't work. What I had to do was the following:

  1. Close Visual Studio.
  2. Rename the %userprofile%\Documents\IISExpress\config directory.
  3. Start Visual Studio again. The %userprofile%\Documents\IISExpress\config directory will be recreated with the default config files.
  4. Copy the original applicationhost.config file over the autogenerated one.

Before anyone asks: the permissions on the folders were identical, the read-only flag was not set on the folder or its files, and I didn't modify applicationhost.config in any way.

Solution 2:

After installing IIS Express, copy all files from

C:\Program Files\IIS Express\config\templates\PersonalWebServer

to

%userprofile%\Documents\IISExpress\config

Solution 3:

Right click on your project file and Edit the project file and remove the URL from IISUrl and reload your project then it will work

Solution 4:

I have just resolved this. It is a strange solution but it worked for me. Here are the steps I took:

Navigate to the folder containing the local IISExpress config files (normally My Documents>IISExpress>config on Windows7).

Find the applicationhost.config file. Rename it to something different e.g. applicationhost2.config.

Navigate to your web project in Visual Studio (I was using VS 2012). Right click on the web project and select Use IISExpress. Run the project. It should fail due to the renaming of the config file.

Change the name of the configuration file back to application.config. Ensure "Use Local IIS Web Server" is selected in the web project settings. Run the solution.

This worked for me.