locked
I get this error: "configuring IIS Express failed - cannot read redirection.config" RRS feed

  • Question

  • User297437924 posted

    Visual Studio used to have a 'open web site' option.   I need this for an older website so I went to the VS installer and added it.  Now I try to use 'open web site', and I get the message: "configuring IIS Express failed with the following error: Filename redirection.config, Error cannot read configuration file. "  I did reinstall IIS Express using the VS installer.   'redirection.config' does exist.   But my project doesn't load (it gets unloaded).

    The history of this project is odd, at one point I tried to resurrect it by making it as a new web-app, and so it has some files from that effort that an older project would not have (like bundle.config). 

    There were problems with the modern version of Visual Studio, for instance, old VS projects allowed pages to inherit from classes in 'App_code' and new projects do not.   Anyway, assuming I want to get this project working as a website (the old way), how do I do that?

    Monday, February 8, 2021 12:23 PM

Answers

  • User1535942433 posted

    Hi RateFor,

    As far as I think,you could right click on your project file and Edit the project file and remove the URL from IIS Url and reload your project.

    And I find a solution off of the beaten track.You could move IIS Express folder into Libraries\Documents folder and remove the read only properties on the folder.

    More details,you could refer to below article:

    https://stackoverflow.com/questions/15897726/iisexpress-8-cannot-read-configuration-file-redirection-config/19928401

    https://forums.asp.net/t/2000566.aspx?Configuring+IIS+Failed+cannot+read+redirection+config

    Best regards,

    Yijing Sun

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 9, 2021 7:31 AM
  • User297437924 posted

    I renamed the IISexpress applicationhost.config to applicationhost2.config, and then tried to recompile my project, and IISexpress created a new applicationhost.config file, full of xml tags, and it worked.   At least it got me to the point where I have to add lots of nuget packages, which is also odd because if Visual Studio creates a project full of asp.net files as one of its options, it should also include all references.   But at least there is progress.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 13, 2021 5:55 PM

All replies

  • User1535942433 posted

    Hi RateFor,

    As far as I think,you could right click on your project file and Edit the project file and remove the URL from IIS Url and reload your project.

    And I find a solution off of the beaten track.You could move IIS Express folder into Libraries\Documents folder and remove the read only properties on the folder.

    More details,you could refer to below article:

    https://stackoverflow.com/questions/15897726/iisexpress-8-cannot-read-configuration-file-redirection-config/19928401

    https://forums.asp.net/t/2000566.aspx?Configuring+IIS+Failed+cannot+read+redirection+config

    Best regards,

    Yijing Sun

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 9, 2021 7:31 AM
  • User297437924 posted

    I'll look at your links, but I tried something new - I created a new web app, and again got the error about IISExpress.   Then I updated Visual Studio to its newest version, and opened the web app I had just created, and got the following message: "The IISexpress applicationhost.config file contains invalid entries and must be corrected".   Then the message again mentioned redirection.config.    I could try editing the project file in a text editor and removing the IIS URL value.

    In fact, I just looked into the vbproj file, and the IIS url is just a beginning and end tag with nothing in it.

    Friday, February 12, 2021 8:25 PM
  • User297437924 posted

    I renamed the IISexpress applicationhost.config to applicationhost2.config, and then tried to recompile my project, and IISexpress created a new applicationhost.config file, full of xml tags, and it worked.   At least it got me to the point where I have to add lots of nuget packages, which is also odd because if Visual Studio creates a project full of asp.net files as one of its options, it should also include all references.   But at least there is progress.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, February 13, 2021 5:55 PM