Metabase Terminology

Applies To: Windows Server 2003, Windows Server 2003 with SP1

MetaBase.xml is structured by using keys. Keys are analogous to file folders in a file system or registry keys in the registry. Each key contains a Location attribute, which specifies its hierarchical location in the metabase. Properties, which define the values for configuring IIS, are contained in keys. Because MetaBase.xml is structured hierarchically, a particular property can be configured differently at different keys. Properties contain attributes, such as the Value attribute.

Table 4.1 summarizes the metabase terminology that is used to describe the structure of the IIS metabase.

Table 4.1 Metabase Terminology

Term Description

Key

A hierarchical container in MetaBase.xml that is used to contain properties. Each key contains the Location attribute within the start tag of the key, specifying the hierarchical position of the key in MetaBase.xml. A metabase key is analogous to a file folder or registry key.

Location

Each key contains a Location attribute — a sequence of location names separated by one or more forward slashes (/) — that uniquely identifies the hierarchical position of the key in MetaBase.xml. For example /LM is the location of the IIsComputer key, and /LM/W3SVC is the location of the IIsWebService key. The latter is a child key of the LM location. A child key is a key that is contained by another key.

Property or Custom Property

A property or custom property defines values that are used to configure IIS. Properties contain attributes; some properties, such as AccessFlags, also contain flags. Properties are contained by keys and can be written, in MetaBase.xml, as schema-defined or custom.

Attributes

Metabase properties contain several attributes that describe some characteristics of the property. Keys also contain attributes, such as the Location attribute or the DefaultDoc attribute found within the IIsWebService key.

Do not confuse the term attributes as used here to describe IIS metabase properties with XML attributes, which describe general XML structure.

Flag

A flag is a bit within the DWORD value of a property that contains flags. Each flag within a property is used to configure particular functionality of the property, such as read or write access. The sum of the flag values for a property becomes the sum of the value attribute for that property.

Keys and Locations

Metabase keys are analogous to registry keys or a directory in a file system. Each metabase key is identified by its name and location, which are defined within the start tag of the key. The following example shows two keys, IIsConfigObject and IIsLogModules, each having a unique location as defined by the value of its respective Location attribute:

Most key names are the same as the value of the KeyType property, also known as the ABO class name, which relates to the type of key. The IIsLogModules key, seen in the example above, is named this way. If you change the KeyType value of a metabase key programmatically, the name of the key changes in MetaBase.xml when the in-memory metabase is saved. This KeyType value is important because the schema-defined collection that is named by using the same KeyType enforces which properties the key can contain.

Keys named IIsConfigObject are special because they are not named by using a KeyType value. Because all properties are schema-defined in the IIsConfigObjectcollection, keys in MetaBase.xml that are named IIsConfigObject can contain any property. You can specify a KeyType value for a key named IIsConfigObject by writing the KeyType property in the key as a custom property. This is not a recommended method, however, because it does not work with ADSI. Preferably, use a real object, not IIsConfigObject.

Some key names describe the type of data at a unique location in the metabase, and thus might appear at multiple locations. For example, because you can have more than one virtual directory, IIsWebVirtualDir is a key that can appear at multiple locations. The Location attribute defines the hierarchical position of a key in MetaBase.xml. The value of the Location attribute, with only two exceptions, is a sequence of location names separated by one or more forward slashes (/) that uniquely identifies the hierarchical position of the key in MetaBase.xml.

The exceptions are the IIS_Global key, which has the highest hierarchical position in MetaBase.xml (Location = .), and the IIS_ROOT key, which has the next-highest hierarchical position in MetaBase.xml (Location = /). The next-highest hierarchical position is the IIsComputer key (Location = /LM). All remaining keys in MetaBase.xml are contained by the IIsComputer key; therefore, their location always begins with /LM/LocationName, where LocationName is the name of the location.

The hierarchical position of any metabase key can be determined by looking at its Location attribute. For example. /LM is the location of the IIsComputer key, and /LM/W3SVC is the location of the IIsWebService key. Because the /LM/W3SVC location begins with /LM followed by a forward slash character (/) and another location name (W3SVC), the IIsWebService key at location /LM/W3SVC is a child of the IIsComputer key. A child key is a key that is contained by another key. A key that contains another key is also called a parent key.