Yesterday I installed an update (Visual Studio 2013 Update 2) to Visual Studio 2013 and since then it has not worked properly.
The update was taking quite a long time so I let it run overnight, and when I returned to my workstation this morning, I was unable to load the WebForm projects in our solution. The error it gives when I attempt to reload the projects is The IIS Express applicationHost.config file contains invalid entries and must be corrected before you can open project WebSite.
I'm not the one on our team that configures the IIS server, so I don't think I have access to the applicationHost.config file, and I don't think it has changed any since yesterday anyways. I am the only one in my team having issues opening out projects, so I am convinced it is my environment and specifically the update I installed yesterday.
I've uninstalled and reinstalled Visual Studio 2013 to no avail.
Go To C:\Program Files (x86)\IIS Express\config\templates\PersonalWebServer
Copy all the files from the above location to the locationC:\Users\User_Name\Documents\IISExpress\config
Go to the path in the message error: At my case is C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config
And rename the file web.config to web_old.config.
At Solution Explorer try reload your project again.
Good look!
I had the similar occurrence for a specific project only for VS 2015.
I went to the respective project folder .vs\config drive and deleted the applicationhost.config file. Then reloaded the project, and it created a new application host file and reloaded successfully.
This happens due to corrupt applicationHost.config file.
Instead of re-installing visual studio,
Go to C:\inetpub\history and copy applicationHost.config file to My Documents\IISExpress\config\
This should solve your problem.
You can copy the folder "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config" from another computer.
This should fix this problem in Visual Studio 2017