Mode: Show Control Panel? Maximize 
Client Login
Industry Articles
Knowledgebase
IIS & Direct Metabase
IIS & Redirects
Terminal Services Shortcuts
Truncating MSSQL Log File
MSSQL Master DB Recovery
AOL & HTML Newsletters
All About SEO
IIS and Direct Metabase Editing

One of the under-the-hood changes in IIS 6 is that the metabase is now an XML file instead of the binary file (metabase.bin) of earlier IIS versions. This means the metabase is a plain-text file that can be edited using a simple text editor like Notepad, even while IIS is running.

Before you start hacking away at the metabase, however, you need to know your way around, and this article is designed to provide you with a bird's-eye view of how the metabase is organized. For a general overview of the changes in IIS 6 see my earlier article, Inside IIS 6.

Physical Structure

The first thing you should know is that there are actually two XML files that make up the metabase:

  • MetaBase.xml is the actual XML file that contains IIS configuration settings.
  • MBSchema.xml is the schema that defines the XML elements of MetaBase.xml and enforces their data types.

Both of these files are found in %SystemRoot%\System32\Inetsrv and Administrators have Full Control permission to modify them. In fact, if edit-while-running is enabled (see Figure 1) then you can even edit MetaBase.xml while IIS is running, though you're actually editing an in-memory version of this file that is then flushed to disk within 5 minutes of any changes having been made (or immediately if the changes were made programmatically using ADSI).

Figure 1
Figure 1. Enabling edit-while-running on IIS 6.

In addition to these two metabase files, IIS 6 also maintains versioned copies of these files called history files. These files are stored in %%SystemRoot%\System32\Inetsrv\History and can be used to roll back changes to the metabase when something goes wrong. IIS maintains both major and minor versions of these history files, the major version number incrementing when IIS is restarted or its configuration saved to disk and the minor version incrementing when the metabase is edited by hand using Notepad. You may also find error files in this directory too, which usually occur when editing causes metabase corruption.