Error - Unable to access the IIS metabase

2019-01-03 07:29发布

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?

标签: c# .net iis
30条回答
疯言疯语
2楼-- · 2019-01-03 08:02

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".

查看更多
等我变得足够好
3楼-- · 2019-01-03 08:03

Changing this key worked for me:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal

The location didn't exist.

查看更多
你好瞎i
4楼-- · 2019-01-03 08:03

This seems like one of those "All errors lead to this message" type of bugs.

Mine was that the App Pool was just turned off. I turned it back on, and everything worked fine.

查看更多
Ridiculous、
5楼-- · 2019-01-03 08:03
  1. Create a shortcut to the "devenv.exe"
  2. select the "Run as administrator" option for the shortcut
  3. doble click on the short cut and reopen your project
查看更多
男人必须洒脱
6楼-- · 2019-01-03 08:03

I'm using Win 8 Pro and VS 2013. After trying everything in this page... I simply reinstalled IIS Express 8 and everything works fine now (even without running as an admin).

My conclusion is that this is a rather generic error and there are multiple root causes.

查看更多
我命由我不由天
7楼-- · 2019-01-03 08:03

You can solve this problem by actually unchecking the IIS tools in your Windows feature list. Then, repair your Visual Studio 2013 installation and make sure Web Developer is checked. It will install IIS 8 with which VS will work nicely.

查看更多
登录 后发表回答