[This is preliminary documentation and subject to change]
IIS provides several public avenues of interacting with the metabase. As shown in the illustration below, you can set or view metabase values programmatically by using any of the following resources:
All configuration settings made using the resources listed above are written to the In-Memory metabase through Admin Base Objects. The In-Memory metabase is a copy of the MetaBase.xml and MBSchema.xml files in the IIS file cache.
The Metabase Updating Process

As shown in the preceding illustration, the Admin Base Objects are central to updating the in-memory metabase. The IIS Admin Base Objects are COM Automation objects that are used to write IIS configuration values stored within the IIS metabase. Individual IIS Admin Base Objects correspond to metabase key names in the metabase and are addressed by their paths within the metabase. Each object has properties, and each property is stored in the metabase. You can manipulate IIS configuration by using IIS Admin Base Objects to add new virtual directories, new Web sites, and so on.
The IIS snap-in and the other resources shown in the illustration that are used to update the in-memory metabase all write directly to the Admin Base Objects. The Admin Base Objects then write the changes to the in-memory metabase. Admin Base Objects can also be directly accessed, programmatically, by using C or Microsoft® Visual C++® code to update the in-memory metabase.
Note
The safest way to update the metabase is by
using the IIS snap-in because this user interface is least likely
to introduce errors into the metabase.
Because the In-Memory metabase is located in memory, which is temporary storage, the In-Memory metabase is periodically written to disk via the Metabase Storage Layer. The metabase storage layer is the part of IIS that reads the metabase files into the In-Memory metabase and also writes the In-Memory metabase to the metabase files. The metabase storage layer takes care of the XML to binary conversion that takes place during these events. The metabase storage layer writes the metabase files into the in-memory metabase via the Admin Base Objects when IIS is started. For information about how the metabase files are read into memory when IIS is started, see Starting IIS. The storage layer writes the In-Memory metabase directly to the metabase files when a write-to-disk event occurs or when IIS is shut down. For information about how IIS iis is written to disk, see Writing the Metabase to Disk and Stopping IIS.
IIS 6.0 replaces the IIS 5.0 metabase configuration file, which used a proprietary binary file named metabase.bin, with a plain-text file named MetaBase.xml. Additionally, the MBSchema.xml file contains the schema, defines default attributes for all metabase properties, and enforces rules—for example, at what nodes properties can be written in the metabase configuration. A binary file named MBSchema_00000000h.bin is used to enable faster IIS startup times and should not be modified by administrators.
Because the MetaBase.xml file is a plain text file, you can directly configure MetaBase.xml using common text tools such as Notepad. For information about configuring the MetaBase.xml file directly, see Editing the MetaBase.XML File While IIS Is Running.
Related Topics