Editing the XML Metabase File

The metabase can be found in %systemroot%\system32\inetsrv\MetaBase.xml. You can edit the metabase file using a text-based program such as Notepad. Two methods of editing the metabase can be used: editing while the server is running and editing while the server is stopped.

Editing While the Server Is Running

To edit the metabase while any IIS services are running, you must have Direct Metabase Edit enabled. This feature is found in the computer's Properties window.

To access this feature:

  1. Right-click the name of the computer in the IIS MMC and choose Properties.

  2. In the Properties window, place a check mark next to the box labeled Enable Direct Metabase Edit.

  3. Click OK.

Note that the Metabase History option must be enabled for 'edit-while-running' to be enabled. Since this option is enabled by default, it shouldn't be a problem. The Metabase History feature stores versioned copies of the metabase with each change saved on the hard disk. That way, if a catastrophic error occurs in the metabase file, you can easily restore it using an older version.

Once edit-while-running is enabled, you can open the MetaBase.xml file with Notepad and make the appropriate changes. They will take effect immediately upon saving.

Editing While the Server Is Stopped

To edit the metabase without Enable Direct Metabase Edit selected, you must stop all the IIS services. This pertains only to editing the MetaBase.xml file directly; you can edit the metabase settings at any time using the GUI, ADSI, or WMI. Once the services are stopped, and all previous metabase changes have been written to disk, you may edit the metabase using Notepad or another text editor.

If in the process of editing the metabase you make a formatting error, such as missing XML tags, it may cause IIS to fail to start. If Metabase History is enabled, IIS will recover by reverting to a previous version and will discard any changes made. Because of the risk posed by human error, directly editing the MetaBase.xml file isn't the best choice for making configuration changes to your web server.




IIS 6(c) The Complete Reference
IIS 6: The Complete Reference
ISBN: 0072224959
EAN: 2147483647
Year: 2005
Pages: 193

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