Unable to access the IIS metabase error and how to fix it

Exporting & Importing App Pools and Websites configuration between multiple IIS instances

This isn't the first time we're talking about the IIS Metabase: we did it already, altough briefly, when we explained how to allow external requests in IIS Express from Visual Studio's debug mode, which could be useful when you need to debug your web application from a mobile device.  If you read the previous post, you'll remember that we also suggested switching from IIS Express to the more robust and resourceful IIS 7.5 or above, which is often the weapon of choice for a .NET developer who wants to test his work in a production-like environment since you can use advanced features such as HTTP Rewrite, Server-side encryption/compression, precise MIME-Type / ISAPI Modules handling, advanced Application Pool control & more.

The problem of ditching IIS Express in favor of IIS is often related to the Visual Studio inability of accessing the IIS metabase with the current user priviledges, not giving the user any option option to automatically elevate them. The problem can arise with a popup similar to the following one:

4743_error

or with an error notice in the Visual Studio Output Window when the Solution tries to load the Web Application's project file:

We can fix these kinds of problems in two ways:

  • Launch Visual Studio with Administrator priviledges (right-click > run as Administrator...)
  • Permanently grant the IIS Metabase folder permissions to the current user.

First options might seem viable but has it nasty set of flaws, the most annoying one being that you won't be able to drag/drop or cut/paste between the Visual Studio Solution Explorer and the Windows Explorer, because the system won't allow the interoperability of two Explorer instances being started with different priviledges.

That's mostly why option 2 is definitely more viable. Put it in motion is really simple, all you need to do is press Win + E to open a Windows Explorer instance, then write the following line on the topmost address bar depending on the OS you're using:

Windows 7, Windows 8.1 and Windows 10

Windows 8 Professional

As soon as you hit the Enter key the following popup will appear, asking you if you want to permanently grant access to that folder to the current user:

folder.permanently.grant

Click on the Continue button, then try to open up the \Export\ subfolder with a couple mouse clicks and repeat the same process.

You're done: from now on, you'll be able to launch Visual Studio with default priviledges and your IIS instance will work without hassles.

Happy coding!

 

About Ryan

IT Project Manager, Web Interface Architect and Lead Developer for many high-traffic web sites & services hosted in Italy and Europe. Since 2010 it's also a lead designer for many App and games for Android, iOS and Windows Phone mobile devices for a number of italian companies. Microsoft MVP for Development Technologies since 2018.

View all posts by Ryan

8 Comments on “Unable to access the IIS metabase error and how to fix it”

  1. Pingback: IIS Express: allow external requests from remote clients & devices
  2. Pingback: DNN Development | rickyyu.info
  3. Pingback: Unable to launch the IIS Express Web server error - How to fix it
  4. Pingback: Process with an ID #### is not running con VS 2015 - Come risolvere

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.