Error - Unable to access the IIS metabase
Asked Answered
A

37

867

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?

Auspice answered 12/10, 2012 at 13:15 Comment(12)
Are you definitely running as admin? Do you get a User Account Control dialog popup when you launch VS?Td
i had the same issue and when i ran VS as administator ( right click and select run as administrator) , it workedFusionism
Which version of IIS, Windows?Prom
Yes, I'm definitely running it as Admin. I right click on it, run as administrator, and get the UAC control before it launches.Auspice
For anyone that comes here later I solved this problem by turning off the IIS and .Net Framework features within Windows 7 and then turning them back on. Somewhere in that re installation it fixed my problem.Auspice
Before you follow any advice posted here, please check if you have pending Windows updates. I had plenty which needed a reboot, finishing the updates fixed the problem.Canonicals
@ThomasEyde Thanks, pending updates to Windows 10 caused the error for me.Trigg
#20985124Body
If you are on a work computer try: #28459896Eadwina
This has to be one of the strangest VS bugs I've ever seen. Thanks, it did work at least! :DCambrel
I had the same problem after Adding feature from this link and then I read this article the issue was gone.Albemarle
I'm having this issue and definitely running as Admin. Yesterday it worked - today it doesn't (yes I right click and get user account control dialogue)Warmup
A
16

Thank you to everyone that answered. Since this was closed for a long time I couldn't provide much feedback, but I did eventually fix my problem. I tried many of these other solutions and they didn't fix my issue, but I'm sure they help when the root cause is different.

My Solution

I solved this problem by turning off the IIS and .Net Framework features within Windows 7 and then turning them back on. It seems like this re-installation is what fixed my issue. I still don't know what caused the problem, but at least one other developer on my team had the same issue.

Auspice answered 5/2, 2013 at 19:30 Comment(0)
D
1460

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.

Deterioration answered 4/7, 2013 at 1:58 Comment(23)
This worked for me too. I found this same information in this MSDN forum answer.Donnelldonnelly
In fact, in my Windows 8 it was the "C:\Windows\System32\inetsrv\config" folder... I hope it helps...Disillusion
It worked, thanks. Just one note, config folder can be located in C:\Windows\System32\inetsrv\configStricken
Works! Much better than running VS as adminVerenaverene
%systemroot%\System32\inetsrv\config (i.e. C:\WINDOWS\System32\inetsrv\config) on windows 8.1 works niceNebula
%systemroot%\System32\inetsrv\config was the correct path for Windows 7Luxembourg
This allowed me to open the project, but won't debug. It claims IIS doesn't list the website, when it works fine as adminSting
@Nate, the problem is that when VS loads the project, it tries to access the IIS metabase, which is in that directory. IIS, on your computer, is locked down under admin privileges. So when you open VS as a normal user, you can't access IIS's metabase and VS can't load the project. (On Windows 7+, you access everything as a normal user by default. The problem is that VS won't ask you to elevate your privileges when you need to, so you need to manually grant the permissions to access that directory to yourself.)Chrome
This happened to me after making a manual change to the machine.configJessy
This does fix it for me, but gives me another one: #10717456 so launching as admin would be the easiest.Chanda
Worked for win8.1 ProElohist
%systemroot%\System32\inetsrv\config for Windows 10, too.Papery
Worked like a charm!!! Thanks very much. N.B. %systemroot%\System32\inetsrv\config also works for Windows Server 2012 R2. Nice!!Marchellemarcher
Yes, yes, yes, yes and yes. The sad thing is all the time lost messing about with this I'll never get back.Roque
%systemroot%\System32\inetsrv\config is not valid for Windows 10 64-bit.Scotopia
@JonathonCowley-Thom Which version is it? in my computer it works fine. (Windows 10 64 bit as well)Repertory
I can't find where to 'Change the shortcut back to Run as me', but what I only did was open the Export folder and it worked.Warrantable
It seems after the last Windows 10 update, I needed to do this again.Injustice
This STARTED happening after Microsoft shoved a massive load of updates down my throat on Windows 10. Forcing my way into those two folders did the trick.Mulley
Yeah, doing this again seems to be required every time Windows 10 has a major update.Moist
Nice. I run into this after cleaning up tons of junk user profiles on Win 7.Arquit
@JonathonCowley-Thom for windows 10: c:\windows\system32\inetsrv\configPostobit
I had this error pop up after a Windows 7 -> Windows 10 upgrade. This is, at the time, the first result in Bing and Google searches. This solved my issue immediately; as in I did not have to restart Visual Studio '17.Speedwriting
B
256

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

Bunker answered 12/10, 2012 at 13:19 Comment(12)
I am definitely running as administrator. I do receive the UAC prompt and it launches successfully from there. I used this with VS2010 as well.Auspice
Try this. Put the following on the command prompt. %windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -iBunker
It's general and is not exclusive for your userBunker
Would that be Framework64 for a 64-bit machine? Also, why not from the v4.x directory?Auspice
Yes, I just opened/converted a massive application written in vs 2008, I setup IIS and tried opening and got the permission iis metabase error, so I right click on vs 2012 and opened as administrator and it opened.Bethina
I doubt you have local admin rights or your admin has locked you down a little. I had same issue and restarted as admin and it works fine.Suffocate
In Windows 8, you can force Visual Studio 2012 to always run as Administrator using the following method: blogs.msdn.com/b/abhiann/archive/2013/02/14/…Bittner
If you want to avoid the pain of running your visual studio as administrator every time (which IMHO is a better solution) then check the response by GordonK2004.Luxembourg
-1 from me.This blog promotes running the IDE as Administrator all the time. This will get you into 101 problems writing correct code that works correctly inside security restricted environments that your users will want/need to deploy into. It is much better to solve each security matter as it crops up in development (as your test each part of the code well) and document the solution needed for users/installer than to turn this Run-as-Administator off just before you roll a release and hope your testers find every security concern you wallpapered over (the cracks).Evelunn
@DarrylMiles Care to share a real-world example where doing this caused a security issue?Basilio
I AM running as administrator and still get this error.Warmup
This is an awful answer, real shame that it's been upvoted so far. Running your VS as an admin is a work-around, not a solution.Tropology
P
57

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. Windows Features dialog showing IIS Metabase option

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

Prom answered 12/10, 2012 at 13:39 Comment(4)
I tried all the other solutions (config folder permissions, not use IIS, run VS as admin, restart IIS, etc.), but this was the only solution that worked for me. Thanks for sharing!Molybdate
Thanks, this helped me too. I am using VS2013 and the project file's config files structure is different than Bruno Sena's answer. I was about to pull my hair out, but then I remembered I'm bold and opted to try this solution which was a quick fix.Saltpeter
Ensure IIS Admin service is started and set Startup type to Automatic instead of Disabled.Arty
Based how restricted your configuration is this might also need admin priviliges.Concavity
C
36

I resolved this issue by granting IIS AppPool identity permissions to the %systemroot%\inetsrv\config

Calcariferous answered 5/5, 2013 at 22:6 Comment(3)
Perfect! Don't need to bother anymore running as Admin. Folder for Win 7 is located here: C:\Windows\System32\inetsrv\configAnis
This worked for me too, Windows 8.1, IIS 7.0, VS 2012. Thanks so muchEndothelium
should be %systemroot%\system32\inetsrv\configDeadandalive
O
33

If you are working on a project which does not require the use of IIS, then a workaround to open the project with this error is to simply right click on the unloaded project and click edit, search for:

<ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="">
        <WebProjectProperties>
          <UseIIS>True</UseIIS>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
</Project>

and set USEIIS to false

<UseIIS>False</UseIIS>

reload the project by right clicking on it after saving changes.

Opine answered 6/8, 2013 at 5:57 Comment(4)
This works for me, but what is the underlying problem here? It must be false on my desktop but true on my laptop. So if I check a project into the TFS on my laptop, it fails to load on my desktop, and vice versa until I change this.Ceremonious
How does this help solve the problem of not being able to use IIS?Scotopia
Setting <UseIIS>False</UseIIS> did not work. The node <UseIISExpress>true</UseIISExpress> was present as well. Setting it to false did not help. Still the same error access to iis metabase is needed.Concavity
This "works" for me and there seems to be confusion on this. Most projects can run under iis express on a person's local machine. Some projects required full IIS. All I needed to do was load the project in VS so I could look at it. If I tried to run it under express it would likely have some kind of run time error. The other developers that actually develop this project and test locally take the time to install IIS locally. So this does not solve the runtime issue. However, someone needs to load it in VS so they can work on it to solve the run time issue so this is a valid answer.Donnie
S
19

I have had two seperate types of problem lead to this error, and thought I'd share...

1. The directory was on an network share and due to UAC restrictions, was 
   unable to be accessed -- even when running as an admin.
2. The directory was on a drive that didn't exist...

Both of these stem from an unfortunate (imo) choice by MS to put things in the Documents or My Document directory, combinee with really lousy error messages. In both of the above cases the fundamental problem was that the IISExpress Config file goes in My Documents, and it either didn't exist or couldn't be accessed.

Schaller answered 4/10, 2013 at 6:38 Comment(6)
How did you solve the problem. I think I'm facing with one the 2 problems.Aboulia
Make sure that both the Projects directory and My Documents directory are on a local disk drive. I put them both on C:\.Schaller
Our VPN dies often and leaves HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal pointing to non-existant fileshare. Changing that to local path solved this problem for me.Glialentn
The solution for me was to copy the IISExpress folder from my Documents folder on another machine to my new machine, and then things started working.Envious
Try this: #28459896Eadwina
I was connected into my office's network via a VPN connection, and for some reason I had to first explicitly access stuff on the network drive on which my My Documents folder is located (I did so by clicking on that drive within Windows Explorer, and everything displayed as expected), and then restart Visual Studio 2013, and then all was well. I guess Visual Studio (which I started as Administrator) didn't have as much "power" as Windows Explorer.Parasitic
A
16

Thank you to everyone that answered. Since this was closed for a long time I couldn't provide much feedback, but I did eventually fix my problem. I tried many of these other solutions and they didn't fix my issue, but I'm sure they help when the root cause is different.

My Solution

I solved this problem by turning off the IIS and .Net Framework features within Windows 7 and then turning them back on. It seems like this re-installation is what fixed my issue. I still don't know what caused the problem, but at least one other developer on my team had the same issue.

Auspice answered 5/2, 2013 at 19:30 Comment(0)
U
14

Navigating to folder: %systemroot%\System32\inetsrv\config presents a security dialog. Click continue and this may resolve the issue. This has worked on two separate Win 10/VS 2017/IIS machines.

Ulrick answered 20/1, 2018 at 8:17 Comment(1)
This has worked for me before as well. Today, trying it on a new laptop, I did not get the security dialog when navigating to the folder, I simply could not get into the config directory at all. I had to right-click and change the permissions on the folder (which required using my local admin access) and give myself permissions, then it worked.Daren
I
13

On a windows 81, from an admin command prompt, use:

icacls "C:\Windows\System32\inetsrv\config" /t /grant "IIS AppPool\DefaultAppPool":(R)

Then go back in VS, right click on the failed project, choose Reload.

Credit to: IIS7 Permissions Overview - ApplicationPoolIdentity

Intra answered 9/9, 2014 at 15:12 Comment(3)
No. This will give read-permissions to the IIS configuration to the web application pool which runs as that identity. Visual Studio doesn't run with this identity, so it doesn't help for this question. Further, why would you let the application pool access the IIS configuration? That's asking for trouble.Faller
+1 but rather than granting access to the DefaultAppPool, I gave read/write access to my user and that fixed the error.Metallurgy
I did the same as David, except with full control (F) and it resolved my issue.Day
D
12

I had this problem - the symptoms were the same, but the issue I had was that I had set the "My Documents" folder to be on a network share, and the share was not accessible.

The root problem was that the IIS config files located at %USERPROFILE%\Documents are not accessible. Once I changed the "My Documents" folder location (I modified the reg value), it started working again.

I know that this may not be a common scenario that you might run into, but I've posted it here because it gives the same symptoms.

Disconcert answered 15/2, 2015 at 22:15 Comment(2)
We work in a VM, co-worker ended up setting a shared folder which ended up using the "My Documents" folder to a network path. As this answer stated, it does not work without the documents folder. I will check if this folder is available first thing in the future to save the 2hrs we spent going through these posts and such lol.Reece
I had this problem also. My Documents folder was on a network share and a network issue was preventing access. Once I resolved the network problem Visual Studio stopped giving the IIS Metabase error.Greenburg
B
8

I came across this today and fixed the problem by removing the IISUrl from the Project file:

  1. Right click project
  2. Click Edit
  3. Delete the following line:

     <IISUrl>http://localhost:xxxxx </IISUrl>
    
  4. Reload project

  5. Now add a new IIS virtual directory by right clicking Project > Properties > Web and selecting Use Local IIS Web Server (Uncheck Use IIS Express) and clicking the Create Virtual Directory button.
Bombard answered 16/3, 2016 at 12:6 Comment(3)
This will not solve the OP issue because you cannot open the project to change the URL when you get this error.Exhalation
I partially disagree with @htm11h. I had the OP's error and removed the single entry above (outside of VS). I then ran VS and was able to at least open the properties. It wouldn't let me save the edits though, so I had to open %systemroot%\System32\inetsrv\config once and continue as admin; also open %systemroot%\System32\inetsrv\config\Export and do same. (error-unable-to-access-the-iis-metabase)Cianca
My comment was that it was not repairable from within VS as you noted. Nice to know that you can directly edit the file though, its was not identified at the time. Most were searching for a reg hack.Exhalation
B
7

You might run across this problem and have same problem as me. I "solved" it before and then power outage and computer crashed, not sure why a registry setting reverted but it is the SOURCE of my problem.

  1. I tried all the running as adminstrator
  2. All the IIS / IIS express re-installs.
  3. Various "hacks"

Came down to having to fix the registry again.

  1. Could not as administrator even open regedit (Need to access registry since problem is not with gpedit.msc admin template )

  2. UnHookExec.inf on desktop

Just save UnHookExec.inf and install it by right clicking and selecting install. Installing the file will not show any popup or notice box. http://www.tweakandtrick.com/2011/04/enable-regedit-registry-editor.html

  1. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal pointing to non-existant fileshare. Changing that to local path solved this problem for me. – Pasi Savolainen Jul 14 '14 at 8:41

(changed from \\cs2data\home\stickelt\my documents to c:\dev )

Now ALL is good and Visual Studio opened solution with 15 projects and connects to IIS and does not complain about not being able to access iis metadata

I had never ran into this before, as nobody at current job had this problem ( many have been here a long time, some got clones of other machines that "worked" and many are on another domain etc.. )

Bethina answered 1/7, 2016 at 20:11 Comment(0)
J
6

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.

Junkman answered 17/1, 2014 at 14:48 Comment(0)
L
4

If you have administrator permissions, Right Click to Visual Studio icon > properties and then advanced, "Run as administrator" check. You can run visaul studio as administrator directly anymore. This way, formal and so basic.

Ladida answered 20/5, 2015 at 8:7 Comment(0)
W
3

In addition to the answer by @nologo, I also had to use IIS. So I changed the

<UseIIS>True</UseIIS>

to 'False' first.

  • Opened the solution and ensured that the project could be loaded.
  • Close solution and that instance of Visual Studio
  • Change the value to 'True' again
  • Open the solution. This time, I didn't get any error/warning. I could also run with Ctrl+F5 or F5 without any problem while my project was mapped to an IIS website.
Weisburgh answered 22/1, 2014 at 8:9 Comment(3)
This helped me with VS 2015, Win10. Useful hints in here, nasty problem. Thanks a lot.Stubbed
This is in the web.config? If so, where?Snail
@BobHorn This is in the csproj or vbproj file. Open the file in a text editor.Weisburgh
V
3

Changing this key worked for me:

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

The location didn't exist.

Vassaux answered 17/4, 2015 at 16:56 Comment(2)
I had to change the key you mentioned, and also HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Personal. This was due to the profile path being set to a non-existent directory in Active Directory/Group Policy.Antoine
A third culprit is HKEY_CURRENT_USER\Software\Microsoft\IISExpress, which is an override custom dir, and another potential culprit for this problemAntoine
R
3

Go to the root directory of your project and find the following file:

YourProjectName.csproj.user - inside it, make sure UseIISExpress is set to false:

<UseIISExpress>false</UseIISExpress>


If that alone doesn't work try the following as well and try again:

YourProjectName.csproj - inside the main project file, make sure both UseIIS and UseIISExpress are set to false:

<UseIIS>True</UseIIS>
<UseIISExpress>false</UseIISExpress>


After changing these I was able to load the project again.

Note: Make sure you run your VS as an Administrator, as mentioned in the other answers.

Ransome answered 2/6, 2017 at 12:53 Comment(0)
K
2

I also had a similar problem. My solution is an extension to the answer "Run as admin" which I hope someone might find useful.

I was running VS2012 and almost every time I had to do the Right Click, Run As Administrator. I got tired of this so instead I went into its properties on the shortcut, clicked advanced, and then clicked the "Run as Administrator" option. Now VS2012 always runs as administrator whenever I open it from that shortcut.

The from that shortcut bit is important. I proceeded to branch my project, and download the branch to a new local folder. Then, when I opened it from the shortcut I had no problem. But if I went directly into the folder, and ran the project locally without the shortcut, it did not run as administrator and I got this error.

Once I opened VS2012 as usual first, then using File/Open/Project It worked again no problem. (because I was running as admin). But I wasn't running as admin when I opened the solution using windows file manager.

The other suggestions seem somewhat extreme, but this is pretty simple so I would tend to give this a try first.

Hope this was helpful.

Karmakarmadharaya answered 20/2, 2013 at 11:51 Comment(0)
B
2

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.

Becker answered 16/7, 2013 at 21:53 Comment(0)
C
2

One more thing you could try:

  • Check if you have pending Windows updates.
  • If you do, please reboot before trying anything else.

I tend to never shut down my machine, so I had plenty of them waiting for a reboot. And that fixed it.

Canonicals answered 15/8, 2014 at 8:56 Comment(0)
L
2

I tried everything above. The credit goes to all of the responses above. Having tried all of the suggestions on their own, I just assembled this combination of suggestions in an order that made sense to me. Note my Documents folder is on a shared drive. The subst/IISExpress stuff is not applicable unless you're in the same boat.

  • Configure VS to run as admin
  • Uninstall IIS via Add/Remove Programs, Windows Features
  • Reboot
  • Run WinRAR or something similar as admin and archive C:\windows\system32\inetsrv\
  • Run cmd as admin and rmdir /s c:\windows\system32\inetsrv\ to completely remove all traces of the last install. Leave elevated cmd prompt open for later.
  • Reinstall IIS with IIS 6 Metabase compatibility (doubt this was necessary)
  • Leave Default AppPool and Default Website as-is (I had previously deleted both)
  • Ran C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ga MYDOMAIN\scottt732
  • Ran C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

Also, because my Documents folder is on a share drive, I was having IIS Express issues. I don't use/like IIS Express, but Visual Studio complained about it.

  • From elevated cmd prompt, ran subst U: c:\Temp. Created C:\Temp\Documents\ and copied the IISExpress folder from my U drive.
  • Created CustomUserHome key in HKCU\Software\Microsoft\IISExpress with C:\Temp\Documents\IISExpress
  • This allowed me to get Visual Studio to open my web projects and edit the properties. I tweaked the projects to store web server settings in a user file and adjusted it to use a Custom URL (not sure if this was necessary)
  • I may/may not have to run the subst command each time I restart. Don't care.

And after throwing in the towel 3 times and spending roughly ~6 hours I can open web projects in Visual Studio (2015 Update 2).

Lair answered 22/4, 2016 at 15:54 Comment(1)
Note to future me: I updated Windows 10 to a preview release & it broke again. This time I ran the 2x aspnet_regiis and the subst command and am back in business. Oh. And don't forget to wind your watch.Lair
R
1

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.

  • Delete the site from IIS
  • Create new site, give it a name "new_site"
  • Select Application Pool other than the site name itself. So it wont be messing up with default settings.
  • Keep IP "unassigned" if you are running it from same machine
  • give it some unused port
  • Run Visual Studio as "Run as Administrator" by right-clicking on VS executable shortcut.
  • You are done!

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.

Reconnoiter answered 26/3, 2013 at 19:4 Comment(0)
W
1
  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
Whangee answered 24/4, 2013 at 12:36 Comment(0)
T
1

Open visual studio command prompt and type below command and run

aspnet_regiis -ga machinename\ASPNET

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:-

aspnet_regiis -i

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

%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe –I

After that Reset the IIS and test the application that resolves your issue

Terminus answered 8/8, 2014 at 9:54 Comment(0)
S
1

I had the same problem after Adding feature from this link afterward I followed this article the issue was gone.

Slobbery answered 19/1, 2017 at 16:3 Comment(0)
N
1

I did a repair of Visual Studio 2015 to solve this. The repair took a long time, but it solved the issue while doing much of the above did not. I am running Win 7 enterprise.

Northey answered 17/3, 2017 at 21:59 Comment(0)
S
1

In Visual Studio 2015: I changed UseIIS in .csproj file to false and it worked for me.

<UseIIS>False</UseIIS>
Subcontract answered 11/9, 2019 at 9:36 Comment(0)
I
0

In my message, beside complaining about "Unable to access the IIS metabase", it also mentions can't access "<IISUrl>http://localhost:6416/</IISUrl>". Right click on the unload project, click Edit, find the line "<IISUrl>http://localhost:6416/</IISUrl>", comment it out. Reload and it should work. This has to do with administrator doesn't have permission to access that address.

Isthmus answered 4/12, 2013 at 20:58 Comment(0)
I
0

I had a similar problem. Visual Studio would not load any web projects and showed the error: creation of virtual directory <myproj:myport> failed. Unable to access the IIS metabase.

In my case it was actually IISExpress that was at the root of the problem. Right clicking on IIS Express in Programs and Features in the control panel and choosing repair fixed the issue in less than two minutes.

Infielder answered 25/2, 2014 at 19:9 Comment(0)
L
0

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.

Latvina answered 4/8, 2014 at 16:25 Comment(0)
D
0

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.

Dainedainty answered 16/8, 2014 at 8:56 Comment(0)
C
0

I had the same problem. For me it was that I was using the same my documents as on a previous Windows installation. Simply removing the IISExpress folder from my documents did the trick.

Curve answered 7/5, 2015 at 7:19 Comment(0)
S
0

I experienced this on a Windows 10 Professional 64-bit machine, and none of the other answers posted here helped. It began happening after I experienced a blue-screen-of-death, and I discovered that UAC had switched itself back on. Running Visual Studio as Administrator alone was not the solution, as my source control was on a network drive, which Visual Studio could not access with UAC on.

Turning UAC back off via GPEDIT fixed the problem.

Scotopia answered 3/3, 2016 at 10:8 Comment(0)
Z
0

In my case, only thing that helped me is to re-install (or repair is easier) IIS 10.0 Express

Zinkenite answered 16/1, 2018 at 8:27 Comment(0)
W
0

Run command:

c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ga %username%
c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
Wop answered 31/1, 2018 at 12:22 Comment(0)
G
0

IIS Express Users - Using My Documents on a Network Share

If your IIS Express application.config is located on a network drive, ensure that the drive is mapped and connected in My Computer.

I was facing this issue and when I re-mapped the network drives in My Computer the issue was resolved.

Gree answered 3/7, 2018 at 9:58 Comment(0)
M
-1

Create a new WebSite, after error go to folder where you created a project, in a txt app open the .csproj file, find this tag "<UseIIS>" and change "false" to "true", in lines bellow find the tag "<IISUrl>" then put the iis url(find url in iis), your tags must be like this:

<WebProjectProperties>
      <UseIIS>True</UseIIS>
      <AutoAssignPort>True</AutoAssignPort>
      <DevelopmentServerPort>0</DevelopmentServerPort>
      <DevelopmentServerVPath>/</DevelopmentServerVPath>
      <IISUrl>http://localhost/yourIISAppAlias
      </IISUrl>
      <NTLMAuthentication>False</NTLMAuthentication>
      <UseCustomServer>False</UseCustomServer>
      <CustomServerUrl>
      </CustomServerUrl>
      <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
    </WebProjectProperties>
Martensite answered 9/3, 2015 at 6:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.