5
votes

I'm trying to open an asp.net MVC project in Visual Studio 2013 on a Windows 7 machine. I'm getting an error about being unable to access the IIS metabase. I've tried every suggestion I could find on the web, but am unable to get this to work. The major change at our company is that our local file server went down. This held all of My Documents. I'm guessing that there was something in there that I need, but I don't know what that file is or how to restore it. I'm unable to make any changes to sites and my bosses are hounding me to get changes done, so I'm pretty desperate. Can someone give me a solution?

If I open the site using the Visual Studio solution file, I get a message saying that the project failed to load. If I right click on it and choose reload, I get a message saying, "Creation of the virtual directory http://localhost:1436/ failed with the error: Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine."

If I open the site as a web site (not using the solution or project files), I get the error "Configuring IIS Express failed with the following error: Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine."

Here's a list of everything I tried. This seems to be most of the ideas people have had, but I'm hoping there's another solution out there you can come up with.

Went to %systemroot%\System32\inetsrv\config

Uninstall/Reinstall IIS

  • Control Panel, Programs and Features, Turn Windows features on or off
  • Unchecked Internet Information Services
  • Clicked apply
  • Restarted
  • Control Panel, Programs and Features, Turn Windows features on or off
  • Checked Internet Information Services
  • Clicked apply
  • Restarted
  • Error - Unable to access the IIS metabase

Repaired Visual Studio 13

  • Control Panel, Programs and Features, Microsoft Visual Studio Professional 2023
  • Clicked Repair
  • Suggested by a co-worker

Change .csproj file

Ran Visual Studio as administrator

Deleted the default web site and recreated it

Repaired IIS

Tried giving Default App Pool access to inetsrv folder

  • icacls "C:\Windows\System32\inetsrv\config" /t /grant "IIS AppPool\DefaultAppPool":(R)
  • Received error saying "Access is denied". According to http://forums.iis.net/t/1189996.aspx, that's not uncommon.
  • Checked that I have admin access (I do) and took ownership of the folder, but kept getting that error.

Checked the registry key in HKEY_LOCAL_MACHINE

1

1 Answers

6
votes

Found a solution to my problem.

I had found a suggestion to check the registry in HKEY_LOCAL_MACHINE to make sure the values were not pointing to a server or other location that did not exist. I thought this made since because I know I'd lost connection to a server. But when I checked the values there, they were already pointing to my C drive. Here's the link where I found this suggestion: Visual Studio 2013. You do not have sufficient privilege to access IIS web sites on your machine.

Did some more digging and finally found a value in HKEY_CURRENT_USER that was pointing to our crashed server. I changed the value to point to the C drive and Visual Studio opened without any problems!

Here's the steps I took:

  • Opened registry (CTRL-R, regedit, OK)
  • Navigated to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\
  • Found the Personal key was pointing to "\OurServer\RedirectedFolders\MyName\MyDocuments"
  • Selected the Personal key, right clicked on it, and selected Modify
  • Entered a location pointing to my user's documents file: "%USERPROFILE%\Documents\"
  • Clicked OK and closed the registry editor
  • When I opened Visual Studio and opened my solution, it loaded without the "unable to access the IIS metabase" error.