Inside the XML Metabase of IIS 6
Pages: 1, 2
Specifically, here's what the key structure typically looks like (actual structure varies with services installed and sites/directories created):
IIS_Global IIS_ROOT IIsComputer IIsConfigObject IIsConfigObject... IIsLogModules IIsCustomLogModule IIsCustomLogModule... IIsLogModule IIsLogModule... IIsMimeMap IIsWebService IIsWebServer IIsFilters IIsCertMapper IIsWebVirtualDir IIsWebServer IIsFilters IIsWebVirtualDir IIsApplicationPools IIsApplicationPool IIsFilters IIsFilter IIsCompressionScheme IIsCompressionSchemes IIsWebInfo IIsConfigObject IIsWebServer IIsWebVirtualDir IIsWebServer IIsWebVirtualDir
Notice that the key structure is flat i.e. all metabase keys are at the same level from an XML point of view and are contained within the
MBProperty key, which itself is contained within the configuration key. So from an XML point of view the structure of MetaBase.xml is simple and looks like this:
<configuration> <MBProperty> <element attribute...></element> <element attribute...></element> <element attribute...></element> ... </MBProperty> </configuration>
<element attribute...></element> defines a different metabase key. It's useful to grasp this structure so you can find your way around the metabase quickly when you want to edit it, but it's also important to understand the location hierarchy as well since this determines inheritance of metabase properties. So here's what the location hierarchy typically looks like:
. / /LM /LM/IISADMIN /LM/IISADMIN/EXTENSIONS /LM/IISADMIN/EXTENSIONS/DCOMCLSIDS /LM/IISADMIN/PROPERTYREGISTRATION /LM/Logging /LM/Logging/Custom Logging /LM/Logging/Custom Logging/Date /LM/Logging/Custom Logging/Extended Properties /LM/Logging/Custom Logging/Extended Properties/Bytes Received /LM/Logging/Custom Logging/Extended Properties/Bytes Sent /LM/Logging/Custom Logging/Extended Properties/Client IP Address /LM/Logging/Custom Logging/Extended Properties/Cookie /LM/Logging/Custom Logging/Extended Properties/Host /LM/Logging/Custom Logging/Extended Properties/Method /LM/Logging/Custom Logging/Extended Properties/Protocol Status /LM/Logging/Custom Logging/Extended Properties/Protocol Substatus /LM/Logging/Custom Logging/Extended Properties/Protocol Version /LM/Logging/Custom Logging/Extended Properties/Referer /LM/Logging/Custom Logging/Extended Properties/Server IP /LM/Logging/Custom Logging/Extended Properties/Server Name /LM/Logging/Custom Logging/Extended Properties/Server Port /LM/Logging/Custom Logging/Extended Properties/Service Name /LM/Logging/Custom Logging/Extended Properties/Time Taken /LM/Logging/Custom Logging/Extended Properties/URI Query /LM/Logging/Custom Logging/Extended Properties/URI Stem /LM/Logging/Custom Logging/Extended Properties/User Agent /LM/Logging/Custom Logging/Extended Properties/User Name /LM/Logging/Custom Logging/Extended Properties/Win32 Status /LM/Logging/Custom Logging/Time /LM/Logging/Microsoft IIS Log File Format /LM/Logging/NCSA Common Log File Format /LM/Logging/ODBC Logging /LM/Logging/W3C Extended Log File Format /LM/MimeMap /LM/W3SVC /LM/W3SVC/1 /LM/W3SVC/1/Filters /LM/W3SVC/1/IIsCertMapper /LM/W3SVC/1/ROOT /LM/W3SVC/388907640 /LM/W3SVC/388907640/filters /LM/W3SVC/388907640/root /LM/W3SVC/AppPools /LM/W3SVC/AppPools/DefaultAppPool /LM/W3SVC/Filters /LM/W3SVC/Filters/Compression /LM/W3SVC/Filters/Compression/deflate /LM/W3SVC/Filters/Compression/gzip /LM/W3SVC/Filters/Compression/Parameters /LM/W3SVC/Info /LM/W3SVC/Info/Templates /LM/W3SVC/Info/Templates/Public Web Site /LM/W3SVC/Info/Templates/Public Web Site/Root /LM/W3SVC/Info/Templates/Secure Web Site /LM/W3SVC/Info/Templates/Secure Web Site/Root </MBProperty> </configuration>
If you're familiar with how IIS 6 works, this location hierarchy makes a lot more sense from a logical point of view than the key structure. For example, we can immediately see that the XML element with location
/LM/W3SVC/388907640 contains metabase properties for a web site with ID number
Now that you have a bird's-eye view of the metabase, here are some helpful resources to help you learn more.
My book, IIS 6 Administration, has a chapter on the metabase that goes into even greater detail than this article does, explaining its structure and function. The book also covers basic metabase administration tasks such as backing up and exporting the metabase using IIS Manager and scripts, restoring previous versions of the metabase from history files, and examples of metabase properties you can tweak for improved performance.
The Metabase Property Reference on Microsoft's web site summarizes the syntax and function of each and every property in the IIS 6 metabase.
Return to WindowsDevCenter.com.