IISExpress 8 Cannot read configuration file redirection.config

后端 未结 24 3034
日久生厌
日久生厌 2020-11-29 02:46

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

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

i

相关标签:
24条回答
  • 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.

    0 讨论(0)
  • 2020-11-29 03:23

    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.

    0 讨论(0)
  • 2020-11-29 03:24

    You don't need to close Visual Studio or rename anything.

    1. Open properties for %userprofile%\Documents
    2. Select Security > Advanced, change owner to yourself (again if you are already owner).
    3. Select "Replace owner on subcontainers and objects" and "Replace all child object permission entires with inherited permission entires from this object".
    4. Ok.
    0 讨论(0)
  • 2020-11-29 03:30

    Visual Studio will only report the filename it looks for, not the full path. The problem for many users is that the IISExpress with the redirection.config can exist in multiple paths, including a OneDrive path which may not be synced.

    To figure out exactly what file Visual Studio attempts to open, use the Microsoft (SysInternals) tool ProcMon. It lists all files and resources Windows tries to access. Add a filter for "Path contains redirection.config" and reproduce the problem in Visual Studio. Now you will see the actual path it tries to use.

    In my case I multiple IISExpress folders. One that was synced to OneDrive and another one that was local. Visual Studio tried to access the OneDrive folder which was not synced to local disk, and thus it failed.

    0 讨论(0)
  • 2020-11-29 03:30

    I ran into this issue while trying to open another developer's solution after installing VS2013 (Update 3 RC). After following the advice here and deleting/renaming/etc. the config folder, VS re-created the files in the wrong location. It created nested config folders:

    C:\Users[user]\Documents\IISExpress\config\config

    I moved everything from ...\config\config into ...\config, and it worked as expected.

    0 讨论(0)
  • 2020-11-29 03:32

    I resolved this (with vs2013 and windows 7) by going to Documents > IISExpress> Config and renaming the application.config. After that, I restarted visual studio and opened my project and it worked.

    0 讨论(0)
提交回复
热议问题