MetaEdit 2.2 is a Windows application that lets administrators edit the IIS metabase. The metabase is a state store for IIS configuration informationin other words, the metabase stores information about the state of IIS's configuration. Knowing about the metabase's background and structure is helpful when you start using MetaEdit. With this knowledge, you can better understand how MetaEdit reads and writes data to the metabase so that you can access master or individual Web sites, prompt the inheritance of properties, and add properties. After you know these basics, you can use MetaEdit to make metabase changes that you can't achieve with Internet Services Manager (ISM).
Metabase 101
You can think of the metabase as a registry for IIS. In fact, the metabase developed out of the need for a better registry. During the design of Windows NT 4.0, developers and software manufacturers added all their state information into the registry. They often used the registry because it had a good editor for their customers and a simple UI with which to program. (If they didn't use the registry, they had to use proprietary binary files for which they had to build a UI.) As a result, Microsoft needed to store more data than the registry could hold, so the company developed a new standard for state information: the metabase.
Unlike the registry, the metabase contains required and optional entries and definitions for values' data types. In addition, child objects can inherit information from parent objects in the metabase. In this respect, the metabase is similar to Active Directory (AD). Just as you can use Active Directory Service Interfaces (ADSI) to read and write information to AD, you can use ADSI to read and write state information to the metabase.
ADSI can have different meanings for different people. A domain administrator might consider ADSI as a programming interface to access the domain users and groups in AD, whereas a Web server administrator might consider ADSI as a programming interface for accessing IIS configuration information. Both views are correct. ADSI is a technology that lets Microsoft and other vendors use a standard format to read and write their state information. Several Microsoft server applications (e.g., IIS, Exchange 2000 Server, Site Server) include an ADSI namespace. You can access each namespace programmatically by using a standard set of ADSI objects that ship with Windows XP, Windows 2000, and NT 4.0.
By default, the metabase file (metabase.bin) resides on your hard disk in the \winnt\system32\inetsrv folder. You use ADSI objects to access the metabase. These objects communicate directly with the namespace provider. The namespace provider for the metabase is inetinfo.exe, which runs as the IIS Admin Server Service. In other words, to access the metabase, you need to start the IIS Admin Server Service. If you try to access the metabase without starting this service, ADSI starts the service for you. Inetinfo.exe is also the process that runs the SMTP, Web, and FTP services. However, these services don't start automatically when you use ADSI, nor do they access the metabase through ADSI. These services run in the namespace provider's process space, so they access the metabase directly.
MetaEdit 101
Some applications that use ADSI objects to change the metabase provide a GUI so that you don't have to use a script to call the objects. (Using a GUI is easier than using a script; however, good reasons exist for using a script. For more information, see "Use Scripts to Configure IIS," page 12.) One such application is MetaEdit. This Windows application is a free download from Microsoft's Web site. For more information about this download, see the Microsoft article "HOW TO: Download, Install, and Remove the IIS MetaEdit 2.2 Utility" (Q232068, http://support.microsoft.com).
Before you use MetaEdit, I highly recommend that you back up the metabase. To perform a metabase backup, follow these steps:
- Open ISM.
- Right-click your computer's name.
- Choose Backup/Restore Configuration.
- Click Create backup in the Configuration Backup/Restore dialog box.
- Enter a name for the backup file.
- Click OK.
The backup file goes into the \winnt\system32\inetsrv\metaback folder on your machine. The file has the extension .mdx, where x is a number that's incremented when duplicate filenames exist. Although the backup file has the .mdx extension, it contains the same data as metabase.bin. After you've backed up your metabase, you're ready to open MetaEdit and begin viewing the metabase structures.
When you open MetaEdit, you'll probably notice that it looks similar to regedit. MetaEdit has a treeview on the left and a list on the right, as Figure 1 shows. Because the metabase is a structured state store, it doesn't store all the state information in the same registry key.