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:
- Running Visual Studio as Administrator
- Running aspnet_regiis.exe -ga MyUserName
- 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?
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
Changing this key worked for me:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal
The location didn't exist.
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.
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.
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.