0

For some reason when I try to open a solution the project says "load failed." When I try reload the project I get the following error:

Creation of the virtual directory //localhost:xxxx/ failed with the error: Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine.

I've run into this error on at least three different occasions and each time I fixed the problem by reinstalling Visual Studio and .NET Framework 4.5.1. However, reinstalling is not working this time. Here are the things I've already tried:

  • Reinstalled Visual Studio and .NET Framework 4.5.1
  • Ran Visual Studio as Administrator
  • Turn IIS features off and on

Unfortunately, none of these things have worked and I really need to resolve this problem

Any suggestions are welcome!

Thank you.

navig8tr
  • 1,724
  • 8
  • 31
  • 69
  • I've searched for and tried many different solutions but none have worked. However, I'll try again. – navig8tr May 18 '14 at 01:35
  • 2
    Change .csproj by hand (notepad/VS open as text) to not deploy to IIS... Make sure to have copy... As good starting point create new solution that matches what you want on that machine to see how it is configured in .csproj file and if your IIS config is ok. – Alexei Levenkov May 18 '14 at 01:41
  • maybe just create virtual directory for this application in IIS? – Alexan May 18 '14 at 01:47
  • It's not easy, but you could use the technet 'Process Monitor' tool to capture what is being accessed just before the error is shown. – WhoIsRich May 18 '14 at 01:50
  • other option: remove this project from solution, then create new project and add existing files from old project manually – Alexan May 18 '14 at 01:50
  • I just tried creating a new ASP.NET MVC project and got an error: Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)). – navig8tr May 18 '14 at 01:54
  • @Alexei Levenkov, In the .csproj I tried changing true to false, but it didn't help. – navig8tr May 18 '14 at 01:57
  • @navig8tr - there is likely something wrong with install of VS on your machine since you can't create ASP.Net MVC project... I don't know what - sorry. – Alexei Levenkov May 18 '14 at 06:17
  • The only thing that worked for me was deleting my entire source folder, then doing a "Get specific version" and checking both "overwrite" boxes, then re-opening the solution. – Josh Aug 07 '14 at 20:37

7 Answers7

6

Right click on the project and select 'Reload Project'

JoshYates1980
  • 3,476
  • 2
  • 36
  • 57
  • 2
    This answer cured my "load failed" problem! It actually displays an error message, which was not being displayed during the original load. – MortimerCat Jan 06 '16 at 16:18
1

Try this trick, Maybe it will work for you.

Go to My document Folder. It's like C:/Users/Username/My Documents

Here is a folder called IISExpress Delete this folder after uninstall IIS express. When it's goes deleted then install the IIS express again and it will surely work.

Anirudha Gupta
  • 9,073
  • 9
  • 54
  • 79
  • The IISExpress folder does not exist in my My Documents folder. I have tried reinstalling IIS though without success. – navig8tr May 18 '14 at 02:09
  • tried this path in your system C:\Users\{username}\Documents – Anirudha Gupta May 18 '14 at 02:16
  • There is no Documents folder. I have the My Documents folder; it just doesn't contain the IISExpress folder. – navig8tr May 18 '14 at 02:19
  • You can better contact http://www.iis.net/ forum. Maybe someone from Microsoft directly help to fix your trouble. – Anirudha Gupta May 18 '14 at 02:26
  • My IISExpress folder is on a network drive. The projects loaded correctly once I connected to the drive. Thanks for the help. You provided a lot of insight into the problem for me. – navig8tr May 19 '14 at 12:17
0

I had that problem after installing Visual Studio 2013 update 4. I occurs that I have to uninstall IIS express for sure, but also it was needed to change in csproj file one of the line:

<UseIISExpress>true</UseIISExpress> 

into

<UseIISExpress>false</UseIISExpress>

and that helped a lot in my case. After this I've just installed IIS express once again.

harmider
  • 373
  • 6
  • 18
0

I have the same problem. Try to run Visual Studio like administrator. This fix problem in my case.

0

In my case, I have to reopen the project as an administrator and then configure it to use IISExpress instead of IIS. Then close and reopen as normal user.

I also have to reset my VS environment.

Hope this help.

Community
  • 1
  • 1
Doan Vu
  • 494
  • 7
  • 12
0

Go to Tools->extensions and updates in VS and check installed plugins and uninstall all That works

-1

thanks for the suggestions everyone.

It turns out this problem was easily solved; all I had to do was go back to work. The computer I'm working on is a work computer, and the IISExpress folder (usually located in C:/Users/Username/My Documents) was stored on a network drive. All I had to do was connect to the network drive and everything now works.

navig8tr
  • 1,724
  • 8
  • 31
  • 69