chevron_left
600 points
7 3 3

The MetaBase is an internal database used by Microsoft's Internet Information Services to store information. The Metabase is a hierarchical, inheritable database that enables HTTP/HTTPS, FTP, SMTP, and NNTP setup at the server, site, folder, and file level. IIS employs different formats with the different versions; previous to IIS version 6, this was always a proprietary format, however, data is now kept in XML files with 6.0 and beyond. MetaBase.xml and MBSchema.xml are two files in the SystemRoot inetsrv directory that make up the Metabase. The Metabase is backed up to the MetaBack subdirectory regularly.

When IIS starts, it reads the two Metabase files and creates an in-memory cache of the web server's configuration called the in-memory Metabase. IIS configuration changes made via the IIS Manager or programmatically are written to the in-memory Metabase, which is then persisted to the on-disk MetaBase.xml file after several modifications.

Photo by jameswheeler

Table of Content:

                1 - What is “You do not have sufficient privilege to access IIS website on your machine”. 
                2 - Reasons that may cause to appear this message. 
                3 - What the Solutions are. 
                                1 - The Solution One. 
                                2 - The Solution Two. 
                4 - The Conclusion.

What is “You do not have sufficient privilege to access IIS website on your machine”.

IIS uses a copy of the Metabase that has been loaded into memory. Changes to the Metabase configuration are instantly reflected in the in-memory Metabase, but not in the physical Metabase files.

When the current in-memory Metabase is copied to the disc, the prior copy of the Metabase on the disc is written to a history file.

You're working on a project with an IIS-enabled web application. However, you lack appropriate credentials to access IIS websites on your workstation, preventing you from accessing IIS metabases. You could get this message if you're working on a project where you don't have this permission.

Reasons that may cause to appear this message.

The difficulty with switching from IIS Express to IIS is that Visual Studio is unable to access the IIS Metabase with the current user privileges, leaving the user with no choice but to instantly elevate their privileges. A popup message might appear and intimate the error message.

error: The Web Application Project Know.WebSite is configured to use IIS.  Unable to access the IIS Metabase. You do not have sufficient privilege to access IIS websites on your machine.

What the Solutions are.

We have two options for dealing with these issues. To start Visual Studio with Administrator privileges. Permanently grant the current user rights to the IIS Metabase folder.

The Solution One.

Amin has all permissions on the PC he is using, so right-click on VS and run as administrator. This option may appear viable, but it has some drawbacks, the most annoying of which is 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 two Explorer instances with different privileges to interact.

The Solution Two.

The second choice is unquestionably more practical. To get it started, press

Win + E

to launch Windows Explorer, then type the following line in the topmost address bar, depending on the OS you're using:

Windows 8 Professional

%systemroot%\inetsrv\config

Windows 7, Windows 8.1, and Windows 10

%systemroot%\System32\inetsrv\config

A message will show as soon as you press the Enter key, asking if you wish to permanently allow the current user access to that folder.

Click the Continue button, then use a couple of mouse clicks to open the Export subfolder and repeat the process.

You've done it: now you can start Visual Studio with default permissions, and your IIS instance will run smoothly.

The Conclusion.

In this article, I explained the issue, its reasons, and possible solutions. Finding a solution to anything can be difficult but not impossible. I am always available to answer any further inquiries. You can ask in the feedback section or the comments.

If you read this far, tweet to the author to show them you care. Tweet a Thanks

More Posts

The operation can’t be completed because you don’t have permission to access some of the items sadmin - May 28
The function evaluation requires all threads to run zhteja - Jul 28
You have Exceeded Your Request Quota For This API zhteja - Sep 23
How to get quality sleep as a Web Developer in 2022 atulcodex - Aug 12
You may not have a proper app for viewing this content. zhteja - Aug 17
The bucket you are attempting to access must be addressed using the specified endpoint Hussain Zafar - Jun 7
How to block someone on youtube from replying to your comments. James - May 31
Your requirements could not be resolved to an installable set of packages zhteja - Aug 1
Update requires a valid updatecommand when passed datarow collection with modified rows. Hussain Zafar - Jun 18
Make the code wait for page load in python amr12345a - Jun 5
NULL undeclared error cafe-coder45 - May 28
blocked a frame with origin "null" from accessing a cross-origin frame sadmin - May 16
The file will have its original line endings in your working directory Ankur Ranpariya 1 - Aug 21
No 'access-control-allow-origin' header is present on the requested resource. Jquery. Hussain Zafar - Jun 6
Make Your Computer translate different languages for You using IBM Watson. EdemGold - Aug 12
This page isn't available the link you followed may be broken, or the page may have been removed. JimCoder - Jul 14
You Don't Have Write Permissions For the /library/ruby/gems/2.3.0 Directory Hussain Zafar - Jun 14
There are 4 bytes in an ipv4 address. what is the highest decimal value you can have for one byte? James - Jun 1
How to do Increment value by 1 in select in SQL? Bushra Rubab - Sep 7
How to get mac address of client machine in PHP James - May 31