raumkrieger
raumkrieger

Reputation: 262

Cannot open Web projects in Visual Studio 2013

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.

Upvotes: 7

Views: 10452

Answers (8)

greg
greg

Reputation: 1873

it sounds like there are two causes. in some cases the files do have a content issue. In this case simply deleting the \config folder files solves the problem as they are recreated.

A second root cause seems to be t the ability of VS to WRITE to the file. In this case , the error message is misleading. You feel good about deleting files and copying files, while this really wont help you.

Between this site and the ms support site, i noticed many posts have to do w/ VS not being able to write to the <%user profile>\documents\iis express\config folder

Ive read a couple posts the mentioned encrypted drives. @Cawboy mentioned OneDrive.

I spent hours deleting files and retrying, then finally had this eureka moment.

In my case, the IIS EXpress folder was marked readonly. In properties, i simply unchecked that box.

My advice would be to investigate that folder.

  • make sure its not read only
  • if its a possibility for you , you might add a Security Setting to let EVERYONE have fullcontrol to that folder.

Upvotes: 0

Cawboy
Cawboy

Reputation: 173

its so funny

in windows 10 this problem happened because of oneDrive application.

if your oneDrive application is off, please run it first and reload project again.

it seem oneDrive lock this files

Upvotes: 2

Beverly Ukandu
Beverly Ukandu

Reputation: 173

I had the same issue error occur. I simply deleted the files found within the \IISExpress\config folder and reloaded the project by closing and opening Visual Studio.

Hope these solutions help everyone else!

Upvotes: 0

Running Rabbit
Running Rabbit

Reputation: 2720

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

Upvotes: 1

Ebrahim
Ebrahim

Reputation: 1

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

Upvotes: 0

CleberTXR
CleberTXR

Reputation: 184

Go to the path in the message error: At my case is C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config

path on error

And rename the file web.config to web_old.config.

At Solution Explorer try reload your project again.

Good look!

Upvotes: 1

Randeep Singh
Randeep Singh

Reputation: 1018

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.

Upvotes: 7

Aditya Bokade
Aditya Bokade

Reputation: 1786

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.

Upvotes: 16

Related Questions