Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IISExpress 8 Cannot read configuration file redirection.config

Tags:

iis-express

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...

like image 673
user1275154 Avatar asked Apr 09 '13 09:04

user1275154


People also ask

Where is redirection config located?

redirection. config is a file that lives in the IIS configuration directory, typically %SystemRoot%\System32\inetsrv\config .

Where is IIS Express configuration file?

IIS Express uses a default, user-specific ApplicationHost. config file to allow many users to share the same computer without interfering with other user's settings. This file is located in the %userprofile%\Documents\IISExpress\config folder or %userprofile%\My Documents\IISExpress\config folder, depending on your OS.

How do I enable IIS Express in Visual Studio 2017?

Select the ASP.NET Core project in Visual Studio Solution Explorer and click the Properties icon, or press Alt+Enter, or right-click and choose Properties. Select the Debug tab. In the Properties pane, next to Profile, For IIS Express, select IIS Express from the dropdown.


2 Answers

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.

like image 108
Ian Kemp Avatar answered Sep 26 '22 19:09

Ian Kemp


After installing IIS Express, copy all files from

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

to

%userprofile%\Documents\IISExpress\config

like image 30
user3877075 Avatar answered Sep 22 '22 19:09

user3877075