0
votes

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.

6
I've searched for and tried many different solutions but none have worked. However, I'll try again.navig8tr
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
maybe just create virtual directory for this application in IIS?Alexan
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
other option: remove this project from solution, then create new project and add existing files from old project manuallyAlexan

6 Answers

5
votes

Right click on the project and select 'Reload Project'

1
votes

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.

0
votes

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.

0
votes

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

0
votes

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.

-1
votes

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.