HTTP error 500.19 - Cannot read configuration file

前端 未结 13 2495
醉梦人生
醉梦人生 2021-02-02 09:37

In one of my ASP.NET apps, all of a sudden I am unable to run it in Visual Studio 2013 due to the error displayed below. It appears that it is trying to open the web.config from

13条回答
  •  轮回少年
    2021-02-02 10:00

    Most simplest way to solve this issue.

    Approximate reason to arise this error is copy project from another pc.

    Solution:

    • Step 01: Open your project folder by right clicking and choose Open Folder in File Explorer.
    • Step 02: Open .vs folder (Hidden Folder) and you will get 2 folder named config and another one is named as your_project_name/config.
    • Step 03: Both config folder will contain a file named applicationhost.
    • Step 04: Open both applicationhost file using notepad and find the directory showing in error screen (Config File \?\C:\User\hp\Documents\My Web Sites\YourProjectName\web.config)
    • Step 05: Just replace this directory according to your pc directory. Example, in my pc I have changed as below:

    C:\Users\Sydur Rahman\Documents\My Web Sites\MyProjectName-Site to C:\Users\hp\Documents\My Web Sites\MyProjectName-Site

    Note: Please make sure you have changed in both applicationhost file.

    That's all. Now your project will run as expected!

提交回复
热议问题