by June 3, 2003 0 comments

As you may have seen in the previous month’s article, Internet Information Server 6 (page 96), Windows Server 2003 introduces Internet Information Server (IIS) version 6.0. It has many new features that allows it to be a Web server worthy of hosting a large number of websites using simple management.

One of the biggest complaints about its predecessor was the instability of the main Web server configuration database, called the Metabase. IIS4 and IIS5 were notorious for downtimes due to crashes in the metabase that could be repaired only from a backup of the database, a re-install of IIS or, in the worst case, a re-install of the OS itself. The reason for this was the metabase was a completely proprietary binary database file.

Enabling the IIS
Direct metabase edit

The metabase in IIS6 has been completely revamped. It now is a simple XML file stored in the form of a plaintext file. Of course, no one but the administrator has read/write access to it by default. 

The metabase is read into memory when the Web server (INETINFO.EXE) starts up. If you remember the process flow charts in last month’s look at the technology changes in IIS6, you will recall that the Web server process’s main job is to only hold this in-memory copy of the

The metabase, once loaded, does not remain static. The WAS (Web Administration Service) reads the XML configuration periodically to monitor the state of the application pool worker processes (more about these next month). 

The file is stored in %SYSTEMROOT%\system32\inetsrv as META BASE.XML.

Change a setting in the
XML file in Notepad…

The file is protected from reading or writing by default. However, the power of the XML metabase comes when you can change the metabase and see the changes affect the Web server immediately. Since this is not allowed by default, you need to enable this setting.

For doing this, open up the Internet Information Services Manager from Adminstrative tools and expand the IIS link.

Right-click on the computer name and select Properties. Turn the ‘Enable Direct Metabase Edit’ field on. Press OK to save the setting. 

Now open the METABASE.XML file in a text editor. As you will see, this is just a normal XML file that you can modify easily enough. If you are interested in studying the structure of this file, another XML file called MBSCHEMA.XML lies in the same folder. You can open this to read it as well.

… to see it immediately reflected in the MMC

Using the XML file
So, let us change a few things in the XML file to see how they affect the Web server. If you have the file open in Notepad, do a text search for ‘Default Web Site’. Once you find this in the XML file, replace the text with any other string, for instance, ‘My Personal Website’. Save the file in the default location itself.

Now switch back to the IIS manager MMC application. Right-click the node and select ‘Refresh’. You will immediately see the name of the website change to the one you just entered.

Similarly, you can perform a huge number of tasks just by changing the setting in the XML file. This also allows you to write administration scripts that modify the XML file (given enough rights) to perform maintenance tasks.

Backup and Restore
Every time you save a file, an automatic backup is made for you. Which means as long as you remember when you made the change, you can always restore back to that point in time. Working just like the System Restore feature in modern Windows versions, the backup rolls back any changes you made to the system settings of

All changes are automatically
backed up and can be restored easily

To look at the backups, right-click the computer node in IIS Manager, select All Tasks | Backup/Restore Configuration… This brings up the dialog box that shows you all the backups that exist, and allows you to create a new backup or select an old backup and restore it immediately.

The auto-backup feature of the metabase works whether you edit in Notepad or any other text- or XML-editor. This feature by itself can save a lot of trouble when a critical system needs to be restored to a previous state. 

Next month we’ll look at another very useful feature of IIS6–application pooling and process isolation. 

Vinod Unny is a Technology Consultant at Enterprise InfoTech

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.