IIS Metabase Structure

   

IIS Metabase Structure

Whereas Windows NT uses the Registry to store its application configuration data, IIS derives its configuration from the IIS Metabase. Like the Windows Registry, the Metabase is a binary format file containing a hierarchical structure used to configure the IIS server.

Note

To view the IIS Metabase, use the MetaEdit utility contained in the IIS Resource Kit, or use ADSI to recursively enumerate the structure of the Metabase.


Examining the Structure of the IIS Metabase Using Visual Basic

By understanding the structure of the IIS Metabase, you can better understand how to create the binding string required to access a specific container or leaf object in the namespace. Figure 8.1 shows the high-level structure of the IIS Metabase.

Figure 8.1. IIS Metabase structure.

graphics/08fig01.gif

This same diagram can be derived programmatically using ADSI and Visual Basic. If you want to view the structure of the IIS Metabase one layer at a time, use the following Visual Basic code to show each child layer in the hierarchy:

 Dim Parent As IADs Dim Child As IADs Dim StartingPoint As String Dim RetVal as String StartingPoint = "  IIS_Server_Name  " Set Parent = GetObject("IIS://"&StartingPoint) For Each Child In Parent   RetVal = Child.Name   Debug.Print RetVal Next 

For example, if you want to view the contents of the W3SVC container, you can do so by assigning the StartingPoint variable to Server_Name/W3SVC . If you use Server_Name/W3SVC as the starting point, something similar to the following output will be displayed:

 Filters 1 Info 2 

On your system, there may be additional integers shown (depending on the number of Web sites you have), but most likely, the site associated with the integer value 1 is the "Default Web Site."

Based on the results displayed in the immediate window, you can then select a new starting point to show the next layer. Change the starting point to Server_Name/W3SVC/1 and something similar to the following will be displayed:

 ROOT IIsCertMapper 

Within the ROOT container, you have access to a wide range of properties that affect the site. In this manner, you can keep peeling away layers of the Metabase hierarchy until you arrive at the point in the namespace where you want to administer, which in many cases will be within the ROOT container.

Tip

If you prefer, you can write a recursive function that will enumerate every node in the tree from a specific starting point. An example of such a function is included at http://www.newriders.com/adsi.

While it is not needed for binding a site, you may want to examine the Metabase structure as it pertains to each of your servers.



   
Top


Windows NT. 2000 ADSI Scripting for System Administration
Windows NT/2000 ADSI Scripting for System Administration
ISBN: 1578702194
EAN: 2147483647
Year: 2000
Pages: 194
Authors: Thomas Eck

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net