Visual Studio 2013. You do not have sufficient privilege to access IIS web sites on your machine
Solution 1
Go to C:\Windows\System32\inetsrv. Click config folder. You will get a popup - "You don't have access to this folder - Click continue to permanently get access to this folder". Perform same for Export folder which is inside config folder. You should be able to open the solution and the web application project will be deployed on IIS.
Solution 2
The root cause of this error for me was that IIS was installing the config folder on a network shared drive at my workplace. I had to change this to use a local drive and it fixed it.
IIS creates an IISExpress folder in your %USER_HOME%/Documents folder (which for me was a shared drive)
For me this issue was solved by uninstalling IIS, and clearing everything IIS related in the registry. I then had to change my Documents drive in Registry (KHCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders) from a shared drive to a local drive (C:\Users[profile]\Documents).
Then reinstall IIS. It should create an IISExpress in the new Documents folder.
Solution 3
In Windows 8, you have to right-click devenv.exe and select "Troubleshoot compatibility".
select "Troubleshoot Program"
check "The program requires additional permissions"
click "Next", click "Test the program..."
wait for the program to launch
click "Next"
select "Yes, save these settings for this program"
click "Close"
Solution 4
I had tried each of the steps recommended and didn't work. So, my last resource was to review the registry to find out if my user was pointing to a temp or cache folder. Some posts were suggesting to check on HKEY_LOCAL_MACHINE
; but those were. So, I finally found it by going into the HKEY_CURRENT_USER
as recommended by boilers222:
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.
Solution 5
Try running VS as admin. If it does not work check if you have IIS metabase folder permission. Open up windows explorer (Win + e). Type the following to address bar:
win 7, win 8.1, win 10 %systemroot%\System32\inetsrv\config
win 8 professional %systemroot%\inetsrv\config
Allow access if needed. Go into \Export\ folder and allow access again.
Source here
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Admin
Updated on July 23, 2022Comments
-
Admin almost 2 years
I just installed VS2013 and turned on IIS 7 on my Windows 7 Ultimate x64 machine. When trying to open a solution I get:
Creation of the virtual directory localhost:xxxxx failed with the error: Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine.
I tried running Visual Studio 2013 as Administrator (right click, run as administrator), still the same error. I also did
aspnet_regiis -i
and it didn't help either. -
user441058 about 9 yearsThe shared drive on our corporate network was down and I got this error. I wasn't able to change the registry setting like you said, but once the shared drive came back online the error went away and VS.NET was working again.
-
dannash918 about 9 yearsIf you can't change through the registry, you can always try: Open up file explorer > C:/Users/[username]/ > Right click on Documents > Select Location Tab, change the location field. (I found I did not have permissions to change this setting, however I did have to change the registry, maybe your permissions may be different)
-
Eric Draven over 8 yearsyour solution rocks! this is only one that solved my problem, no reboot needed. thanks
-
Tsar Bomba over 8 yearsWorked perfectly. Thanks.
-
cdmdotnet over 8 yearsThere's got to be a better solution than moving ALL of your documents folder. That seems like a sledge hammer to an ant solution.
-
Jonathon Cowley-Thom over 8 yearsDidn't fix it for me. I didn't get a popup - I had access to this folder already.
-
Rodney about 8 yearsThis worked for me too. Does anyone have any ideas why this would need to be done even if the account in question is in the local administrators group?
-
cdmdotnet about 8 yearsSo, in-short the issue is that your "My Documents"\"Documents" folder was on a network share. OUCH. that's a pretty crap limitation.
-
James Shaw almost 8 yearsThe solution was concise and on spot! It resolved the same error I was getting while using VS2015. Thanks!
-
askrich almost 8 yearsDid you ever find a way of taking it off your network share? I'm having this problem too, but concerned changing my registry could cause problems with other (non-IIS) applications
-
dannash918 almost 8 yearsUnfortunately this was the only way I could manage. Tried reinstalling multiple times but that did not work. However I have not had any other issues after I changed this. You can always try changing then if it breaks something change it back?
-
Alex 75 almost 8 yearsI think the problem appeared on my computer after the big update of Windows 10 released on September 2016. I had to navigate and allow access just to the "config" folder. I had the VS solution yet open, I reload the project and it worekd.
-
Walter Stabosz over 7 yearsI added a quick video of the process you described so that people can see what the prompts look like and understand that there are two folders that need to be fixed.
-
Ali Khakpouri about 7 yearsThis is a valid solution for VS-2017 as well.
-
Dominick about 7 yearsSimilar situation - my Personal key was pointing to a drive that was no longer mapped. Amazing the grief that this has caused.
-
Vincy over 6 yearsIsn't this answer already mentioned above in 2015? Anyway, it still doesn't work for me, in windows 10.... in my case I have enabled https and not sure that is the case