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?
Open visual studio command prompt and type below command and run
After running the above command Reset the
IIS
and test the application that resolve your issue.If above command doesn’t resolve your problem then try to run below command in
visual studio command prompt:-
Alternatively we can run above command from our windows command prompt also
Go to the Start menu and open Run and enter and click
OK
After that Reset the IIS and test the application that resolves your issue
I just had the same issue with me today. And I found it annoying. Though I have other two websites already under development from the same IIS but still was not able to create new site. Strange, but I did this.
You do not need to turn off/re-install anything other than what I have stated since it works.
Let me know if anybody had the same issue just like me and solved the same way. I think it was not the issue but a wrong way of creating website on localhost which Visual Studio rejects to open.
I hope this will help newbies.
One more thing you could try:
I tend to never shut down my machine, so I had plenty of them waiting for a reboot. And that fixed it.
I think we encountered a similar problem at work. For us, the solution was to go into Control Panel -> Programs and Features -> Turn Windows Features on or off... inside that, we had to select Internet Information Services -> Web Management Tools -> IIS 6 Management Compatibility -> IIS Metabase and IIS 6 configuration compatibility.
Give that a try and let me know if it helps!
Note: We're running IIS 7.5 on Windows 7 using both Visual Studio 2005 and 2010 and doing stuff with super-old-school WebServices (.asmx)...
I just had this issue today and I found that I didn't open VS as 'Run as Administrator'. After doing this, I was able to publish the Service.
On Windows 8 Pro:
On Windows 7 and 8.1 and 10
(Where
%systemroot%
is usuallyC:\Windows
)Navigate to the appropriate location above in Windows Explorer. You will be blocked access with a popup which says:
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.