IIS Insider - June 2002

By Brett Hill

How To Back Up IIS Settings

Q: How can I backup IIS settings?

A: There are a number of ways to back up your IIS configuration. The properties and values set in the Internet Information Services Manager console (also called the IIS snap-in) are stored in the metabase.bin file located at C:\winnt\system32\inetsrv by default. In IIS 5, you can back up the metabase from inside the IIS snap-in. To do this, select the computer icon and right-click. Then select Backup/Restore configuration. You can then select to back up your current metabase settings or restore a previous version. This same option is also available in MetaEdit 2.2.

When you save the metabase in this way, your backup is stored in the C:\winnt\system32\instrv\metaback folder as an .md0 file. The file will have the name you assigned when you made the backup, such as Pre-Lockdown.md0. If you create multiple backups with the same name, they will have incremental extensions such as Backup.md0, Backup.md1, etc.

In the event that your metabase is seriously corrupted, you may be unable to start IIS. In that event, you will not be able to do a restore from the IIS snap-in or metaedit. Should this occur, you can restore replacing metabase.bin with the most appropriate .md0 (.md1, etc.) metabase backup file from the metaback folder. Presuming that your backups are good, IIS will start right up.

There are two other means to make a backup of the metabase. You can simply copy metabase.bin using xcopy, scopy, or any other copy routine. It is a good idea to stop the Internet services first so that your metabase is up to date and not in use.

Finally, there are two scripts provided - metaback.vbs and metarest.vbs - which are located in Inetpub\IISSamples\sdk\admin (if you installed the IIS SDK on IIS 5) or in the IIS Resource Kit\Utility\ADSI Admin Scripts folder (if you installed the IIS 4 Resource Kit). These .vbs scripts use ADSI command specifically provided to make metabase backups.

Tools for Stress Testing IIS Applications

Q: We've planning on stress testing our IIS applications that are nearly ready to deploy. What tools are available to help us place a load on the application?

A: There are a number of tools available for this purpose. You will find there are quite a few commercial tools available that are fully equipped and can be useful. Microsoft provided the Web Application Stress tool for free that is sufficient in a lot of cases for loading web servers to see how well they perform when stressed. You are wise to undertake this study as problems with application design may not be revealed until the server is under a load, and you don't want to discover this on a production server.

The Web Application Stress Tool has several features you will find useful, including the ability to record a playback script while you point and click your way through a web site. You can then playback the script on one or numerous clients simultaneously while remotely monitoring performance monitoring counters on the server. In addition, you can specify details such as user accounts to use for testing authentication throughput, as well as indicate delays between requests and testing schedules.

When you install the Web Application Stress tool, it installs a service on the computer called WebTool. Be sure to uninstall the Web Application Stress Tool when it is no longer required.

Localstart.asp Is Under Construction

Q: I am using Window 2000 Professional and installed IIS 5 in order to develop ASP. The problem is that I can't review my local host page or localstart.asp. When I do, it returns a message saying it is under construction. Where and how can I get that page!

A: The "Under Construction" page should appear any time you access the default web site from a remote IP address. If you access it from a local IP address, the IIS online documentation should be displayed. If you access http://localhost in Internet Explorer, and you do not have default.htm or default.asp installed, the web site will run iistart.asp. IISStart.asp will check for two conditions:

  • If you type in "localhost"
  • If the client IP address match the server IP address.

In either event, you will be redirected to localstart.asp which will then open the required pages.

Make sure these files are present on your system and that the Documents tab calls IISStart.asp. If that is correct, something is pretty peculiar. Just to make certain, you may want to write a brief .asp page that displays the values of the server variables, as follows:

Your local IP address is <%= Request.ServerVariables("LOCAL_ADDR")%><br> The client IP address is <%= Request.ServerVariables("REMOTE_ADDR")%>

If the IP addresses are not identical, the localstart.asp page will not be invoked. Of course, you can always call it directly with http://localhost/localstart.asp. You will have a problem invoking localstart.asp directly if the there is no default document configured. The script will return the message:

You do not currently have a default document set for your users. Any users attempting to connect to this site are currently receiving an Under Construction page.

Submit your questions to the IIS Insider. Selected questions along with the answers will be posted in a future IIS Insider column.

For a list of previous months' questions and answers on IIS Insider columns, click here.

We at Microsoft Corporation hope that the information in this work is valuable to you. Your use of the information contained in this work, however, is at your sole risk. All information in this work is provided "as is," without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Microsoft Corporation. Microsoft Corporation shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.