IIS Express - 500.19 Cannot read configuration file - because it's looking at the wrong path

前端 未结 14 1112
梦如初夏
梦如初夏 2021-02-01 00:42

I recently renamed my root TFS folder from D:\\TFS\\systemstfs to D:\\TFS\\sys because one of the project\'s paths was too long for Windows. Now, when

相关标签:
14条回答
  • 2021-02-01 00:44

    Had the same issue today.

    Change that caused the issue

    Moving functionality from a separate controller to home controller. I literally moved a view and the functionality behind it from Controller'X' to HomeController

    Nature of the issue

    1. Everything works fine when run via IIS express/ Visual Studio
    2. Every thing works fine when deployed locally to IIS.
    3. Hell breaks loose when deployed to the Deployment machine.
    4. Works fine if I deploy to a 'new Site' in Deployment machine's IIS.

    Fix

    1. delete the Site/application pool instance from IIS.
    2. Recreate them.
    3. Deploy.
    0 讨论(0)
  • 2021-02-01 00:53

    If using a Virtual machine with "Shared Folders" -- I was using Workstation Pro to share the folder. When the project was in the "Shared folder" that was hosted on the HOST PC I was unable to run the project. Moving the project to a "Local" Drive resolved for me.

    0 讨论(0)
  • 2021-02-01 00:54

    Here is another possible solution that doesn't involve fishing for the applicationhost.config file:

    • Right click Web Project > Web > Project Url > (e.g. 'localhost:5459') and then increment the port number which will force a new entry in that file.

    In my case I also needed to change authentication mode which can be done via:

    • Select Web Project > press F4 > set Windows Authentication as needed (enabled in my case).
    0 讨论(0)
  • 2021-02-01 00:54

    In my case, the following changes resolved this error:

    Open applicationhost.config file from [SolutionFolder]>.vs[Hidden Folder] and change the value of overrideModeDefault attribute in windowsAuthentication section from Deny to Allow. As shown below.

    0 讨论(0)
  • 2021-02-01 00:56

    I got the same error on IIS 8.5 (not express)

    For me it was because I had replaced the folder with a copy and renamed it while IIS was running. For some reason it kept erroring out. I had to remove the website definition from IIS and re add it to get it to work.

    0 讨论(0)
  • 2021-02-01 00:56

    I got this error while getting code from my colleague and it was referring her path. I tried checking the path in whole application folder but couldn't. So I again got the code from different source other than my Colleague.

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