New features give you more control

Web masters need tools that minimize the time they spend managing Web sites and Web applications from their Web servers. One of Internet Information Server (IIS) 4.0's strengths is the ability to customize many of its features to ease this management burden. However, customizing can seem overwhelming at times. For example, when you first open the Internet Service Manager (ISM), IIS 4.0 presents you with a daunting set of options. To complicate matters, the options are context sensitive and change depending on your current selection. If you select an entry in the left pane of ISM, the toolbar displays one set of options; if you select an entry in the right pane, the toolbar displays another set of options.

IIS's context-sensitive environment takes some getting used to, but it can be extremely useful when you are working with Microsoft Management Console (MMC)­a central location for managing and changing IIS 4.0's various property pages and context menus­to manage your Web presence. (MMC stores the values for most of the IIS properties in the Metabase, a configuration store for IIS similar to the Windows NT Registry, at \WINNT\system32\inetsrv\metabase.bin. You need to back up the Metabase as you do the Registry.)

In previous articles, I introduced several new features that IIS 4.0 provides for systems administrators, software developers, and Web masters. In this article, I'll show you how to use some of IIS 4.0's features and options to help you manage your Web sites and servers, manage your Web applications, and improve the performance of your Web server.

Managing Web Sites and Servers
With IIS 4.0, you can manage features globally for an entire Web server or change a particular property for a specific Web site. With IIS, a Web site directory can inherit property values from a higher-level directory. This feature simplifies setting specific properties for an entire Web site and setting other properties for a particular portion of a site. For example, Screen 1, page 186, shows the Directory properties page for the sample ExAir Web site that comes with IIS 4.0. I've set specific properties for this Web site, including Index this directory (as Screen 1 shows). In the MMC view of the ExAir Web site, as you see in Screen 2, page 186, I can customize the settings for the Benefits directory. By right-clicking Benefits and selecting Properties from the context menu, I can clear the Index property check box. The net result of adjusting these two properties is that IIS will index every directory under the ExAir directory except the Benefits directory. Each directory inherits the settings from the ExAir master properties pages except the Benefits directory, which now has different settings from the ExAir directory.

I can also turn off the index feature for all parts of the ExAir Web site that I don't want to index. This feature makes managing the site easier and reduces the load on the Web server. The indexing property is just one of many properties you can change for directories.

You can change the default properties that all Web sites inherit by editing the master properties for the entire server. After you configure the default properties to your liking, IIS updates the properties for existing sites and will copy these global property settings when you create a new site. To change the default properties, you must use the master properties pages for the Web server. From the ISM, select the server and click the Properties icon, or right-click the server name and select Properties from the context menu. You will see the server properties page, as shown in Screen 3, page 186. If you select WWW Service from the Master Properties list and click Edit, you see the master property pages for the WWW service. You can change the master properties for other services by choosing the appropriate service from the Master Properties list in Screen 3.

After you change the master properties, you must click Apply or OK for the changes to take effect. If you modify the same properties for other Web sites on the same server, you will see a dialog box similar to the one shown in Screen 4. If you change more than one master property, you will see a dialog box for each property you change. This feature lets you selectively apply master property changes to specific sites.

You can see how master properties simplify managing properties for a collection of Web sites on a server. However, properties that contain a list of items instead of one value can be tricky because you can accidentally overwrite other settings. When you change a master property list item, changes that propagate to existing sites overwrite existing lists and you lose the settings for the entire list. To work around this situation, you need to

  1. Write down changes you make to any master properties.
  2. Note affected sites by performing a screen capture or writing down the names of the sites when the Inheritance Overrides dialog box displays for the list item.
  3. Click Cancel on the Inheritance Overrides dialog box to abort the propagation process for any list items.
  4. Edit the properties for each site you noted in step 2.

Using IIS 4.0's master properties feature, you can control more of your Web sites' functions than you can with IIS 3.0. For example, imagine that you need to know which sites on your Web server have changed a property from the master property default. To find out,

  1. Edit the master properties for the Web site.
  2. Change the property of interest to another value.
  3. Note affected sites by performing a screen capture or writing down the names of the sites when you see the Inheritance Overrides dialog box.
  4. Click Cancel on the Inheritance Overrides dialog box to abort the propagation process.
  5. Edit the master properties, and change the property of interest back to the default value.

Managing Web Applications
IIS can host a simple Web site or a Web application. A Web site is a directory that contains several HTML and supporting files (such as .gif and .jpg images) that provide all the information for the site. A Web application contains files that have programming logic written in Visual Basic Script (VBScript), Java Script (JScript), Common Gateway Interface (CGI), or Perl, and possibly contains Internet Database Connector (IDC) files and HTML Extension (HTX) files. The script for the programming logic is executable code that can access a database or the file system on a Web server or network. The script can also execute commands that perform other tasks. The application dynamically generates information so that you don't need to rely on information residing in HTML files on the server's hard disk.

IIS 4.0 handles applications as special entities. To create an application, you must do more than create an .asp file and place it in a particular directory. Instead, use the ISM to create the application. Screen 5 shows the application properties for the KensDec97 Web site. I created the application using the ISM, which automatically generated the settings you see in Screen 5. To create a similar site, you simply right-click the Default Web Site in MMC's left pane and select New from the context menu. Next, you select Virtual Directory from the context menu, and then follow the prompts.

The Application Settings you see in Screen 5 control what happens within the directory structure (i.e., the physical and virtual directories) for that application. Screen 6 shows the KensDec97 application directory, which contains three directories I created: Scripts, Data, and Images. You can set individual permissions and property settings to help you control each subdirectory.

Improving Performance
Performance is an important issue for systems administrators working with Web servers. For example, systems administrators must ensure that a Web server delivers the appropriate level of performance. You can hurt your business and drive down your company's image by deploying a substandard Web server for public access.

Another performance concern is how the Web server affects the system running the software. Many companies run their Web server and other software from one system. To ensure that your Web server doesn't run wild as the demand for system resources increases, you must be able to control your Web server's consumption of system resources. Otherwise, your Web server might consume all the system resources, which can negatively affect the performance of other applications on the same system.

IIS 4.0 provides several mechanisms to help you control performance. To start, you can control the network bandwidth that your Web server uses for static HTML files. You can set this property for the Web server in the server properties dialog box in Screen 3 by selecting the Enable Bandwidth Throttling check box. After you select this setting, you can adjust the Maximum network use setting in kilobytes per second for the Web server.

You can also control the network bandwidth for each Web site. Screen 7 shows the Performance tab for the Default Web Site Properties page. Notice that I selected the Enable Bandwidth Throttling check box and changed the Maximum network use setting for this site. The comment, This value overrides the global setting on the Computer properties, tells you that changing this value overrides changes you set for the Web server via the Master Properties page.

Next, by changing the Performance Tuning property, which Screen 7 shows, you can balance the performance of the server with the amount of memory the server uses. You will want to adjust the slider according to the number of connections that access your site each day. This value is roughly the number of pages that users access multiplied by 4, because most browsers can make up to 4 concurrent connections to download each page. For example, if your site has 10,000 page accesses per day, your site is handling about 40,000 connections per day.

When you adjust the Performance Tuning slider, you are helping IIS decide how much memory to allocate to your Web server. The IIS documentation suggests that you set the slider to a slightly higher value than the actual number of hits you expect to take. Setting the slider to a slightly higher value causes new connections to occur faster. You can adjust this property for each Web site and tailor the amount of memory a site uses.

Another property you can set to control performance is the maximum number of connections to the site. Screen 8 shows the Web Site tab for the Default Web Site Properties page. To limit the number of connections, select the Limited To option, and enter the number of simultaneous connections you want to allow.

Gaining Control
IIS 4.0 offers a variety of settings for performance control of your Web server and specific Web sites. Because you can customize in detail how your Web server and Web sites operate, you must understand the interaction between the settings and the other applications and services running on the system that houses your Web server. Finally, you must understand how IIS 4.0's settings affect the usage of critical components such as memory and the processor.

Web developers will want to use Visual InterDev 6 to build Web applications for IIS 4.0. It lets developers control many IIS 4.0 features from a development workstation.