Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error - Unable to access the IIS metabase

After installing Visual Studio 2012 and opening my solution I get a series of errors in this form:

The Web Application Project Foo is configured to use IIS.
Unable to access the IIS Metabase. You do not have sufficient privilege to access IIS web sites on your machine.

I get this for each of our web applications.


Things I have tried:

  1. Running Visual Studio as Administrator
  2. Running aspnet_regiis.exe -ga MyUserName
  3. Running aspnet_regiis.exe -i

These seem to be common solutions for this problem but I have not had any success with them.

Is there anything else I can try to do?

like image 914
jjathman Avatar asked Oct 12 '12 13:10

jjathman


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.


2 Answers

On Windows 8 Pro:

%systemroot%\inetsrv\config 

On Windows 7 and 8.1 and 10

%systemroot%\System32\inetsrv\config  

(Where %systemroot% is usually C:\Windows)

Navigate to the appropriate location above in Windows Explorer. You will be blocked access with a popup which says:

"You don't have access to this folder - Click continue to permanently get access to this folder"

Click 'continue' for this folder, and with the Export folder underneath. I changed the shortcut back to "Run as me" (a member of the domain and local administrators ) and was able to open and deploy the solution.

like image 144
Gordon Kenyon Avatar answered Sep 28 '22 20:09

Gordon Kenyon


I think you are not running visual studio with administrator permissions. Look that:

http://bloggingabout.net/blogs/rick/archive/2012/10/04/unable-to-access-the-iis-metabase.aspx

To quote

The solution to this is simple: start your Visual Studio with "Run as Administrator". You can do this by right clicking the shortcut and selecting "Run as Administrator".

like image 44
Felipe Ardila Avatar answered Sep 28 '22 21:09

Felipe Ardila