Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013: Unable to access IIS metabase

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

  • Info online said I would be prompted that I didn't have access and could change the access
  • I was not prompted that I don't have access; I could open all the folders
  • http://www.ryadel.com/en/unable-to-access-the-iis-metabase-error-and-how-to-fix-it/

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

  • Use IIS tags already set to true
    • <UseIISExpress>false</UseIISExpress>
    • <UseIIS>False</UseIIS>
  • IIS URL tag already had nothing in it
    • <IISUrl></IISUrl>
  • Error - Unable to access the IIS metabase

Ran Visual Studio as administrator

  • Right clicked on C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe
  • Clicked Run as Administrator
  • Error - Unable to access the IIS metabase

Deleted the default web site and recreated it

  • Opened IIS
  • Right clicked on Default Web Site and clicked remote
  • Added new site called Default Web Site
  • Recreate the default website in IIS

Repaired IIS

  • Control Panel, Programs and Features, IIS 10.0 Express
  • Clicked Repair
  • Error - Unable to access the IIS metabase

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

  • Went in the registry to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Common Documents
  • Value was already set to C:\Users\Public\Documents
  • Visual Studio 2013. You do not have sufficient privilege to access IIS web sites on your machine
like image 342
boilers222 Avatar asked Apr 07 '16 14:04

boilers222


People also ask

Where is IIS MetaBase file located?

The MetaBase is IIS. It holds every configurable element of IIS and is stored in XML form, it is in the windows folder (i.e. \windows\system32\inetsrv\MetaBase.

Is configured to use IIS You do not have permission to access the IIS configuration file?

"You do not have permission to access the IIS configuration file. Opening nad creating web sites on IIS requires running Visual Studio under an Administrator account. You will need to manually create this virtual directory in IIS before you can open this project".

What is MetaBase file?

The metabase is an inheritable, hierarchical database that allows for configuration of HTTP/HTTPS, FTP, SMTP, and NNTP at the server, the site, or the folder or file level.


1 Answers

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.
like image 90
boilers222 Avatar answered Oct 04 '22 05:10

boilers222