HTTP error 500.19 - Cannot read configuration file

PongGod picture PongGod · May 21, 2014 · Viewed 25k times · Source

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 a path that doesn't even exist. All of my project code, including web.config, are located under C:\Projects\SourceCode\AFEManager\Trunk\AFEManager.Web. I've found a number of posts here from users experiencing a similar error, but the solutions seem to vary and none I've found so far seem applicable to my situation. I looked in that TraceLogFiles directory and the most recent log file there is five days old so it obviously hasn't been logging anything since I've been having this issue. Any suggestions are appreciated.

enter image description here

Answer

MirrorBoy picture MirrorBoy · Nov 10, 2016

In my case I deleted all folders in D:\My Documents\My Web Sites\ before Then I caught the error There is a file .vs\config\applicationhost.config in my solution folder It contains reference to the deleted folder. So, I deleted applicationhost.config and then pressed 'Create Virtual Directory' button in my project property Web page. It was recreated the file and the folder