Compartilhar via


Comparison of IIS Administration Features

IIS can be configured manually, or programmatically from standalone scripts or applications. The table below provides information about each method of configuring IIS.

The manual methods are as follows:

  • User Interface

  • Edit-while-running

  • Third-party metabase viewing tools

  • Command line tools provided by IIS

The programmatic methods are as follows:

IIS can also be configured from Web applications. For information about the different ways to create Web pages, see Comparison of IIS Development Technologies.

Method of configuring

Advantages

Disadvantages

User Interface (UI)

Use IIS Manager, the management user interface that comes with IIS, to configure the most common properties in the metabase. Open the property sheets for a service, site, or virtual directory and change values. Changes take place immediately without a need to stop and start the server.

To force the in-memory metabase to be written to disk, use the Save Configuration to Disk option.

IIS 5.1 and earlier: The management user interface is called IIS snap-in and it runs in a Microsoft Management Console (MMC) window. To force the in-memory metabase to be written to disk, use the Backup/Restore Configuration option.

When you create a site or virtual directory, or when you configure a feature with more than one property, the management user interface sets all the supporting properties.

IIS Manager informs you if the a new value is invalid.

Managing large IIS server configurations or multiple servers over the Internet can be slow and cumbersome.

Not all configuration properties can be accessed in the user interface. For a list of those that can, see Configuring Properties in IIS Manager.

Edit-while-running

Use a text editor such as Notepad to directly edit the Metabase.xml file while IIS is running. Entries are case-sensitive. Edit-while-running is not enabled by default. To enable edit-while-running, configure the EnableEditWhileRunning metabase property by following the instructions in the topic titled Enabling Edit-While-Running in the IIS User Documentation.

Changes do not take place immediately. Instead, a change notification is sent to the IIS server. To force the in-memory metabase to be written to disk so that you can edit the latest configuration in Metabase.xml, use the IISConfig.vbs or IISRESET.exe command line tools.

IIS 5.1 and earlier: Edit-while-running and IISConfig.vbs are not available.

You can change multiple properties or create new nodes in one instance without having to open and close multiple property sheets.

It is easy to corrupt an IIS server by using edit-while-running. If your edits include XML that is not formatted correctly, IIS cannot read the metabase and the last history file must be restored. If your edits include an invalid configuration that does not comply with the rules in the schema, an error is logged in the event viewer, but the rest of IIS can run.

Property inheritance must be taken into consideration when cutting and pasting portions of the metabase. The section you paste might inherit properties from parent nodes and impart properties to child nodes.

If you are using edit-while-running over the network and the connection fails, you might end up with an invalid metabase.

Using edit-while-running on multiple servers in a Web farm takes as much time as using the user interface.

Third-party metabase viewing tools

Use a third-party application to display the metabase visually and make configuration changes. Some metabase viewing tools, such as CIM Studio (which comes with the WMI SDK), Metabase Explorer, and MetaEdit, are provided by Microsoft. You can find Metabase Explorer in the IIS 6.0 Resource Kit Tools, and you can find MetaEdit by searching on MSDN Downloads.

IIS 5.1 and earlier: CIM Studio does not allow you to view the metabase for these versions because the WMI provider for IIS is not available.

Most of these tools present the metabase visually in a hierarchical way that makes it easier to understand the format of the metabase.

Usually, all properties are available to be edited.

Most tools do not allow you to configure more than one IIS server at a time. MetaEdit is the exception because it was developed to work in a Web farm.

Tools that are produced outside of Microsoft do not alert you when you set a property that requires supporting properties.

Command line tools provided by IIS

Use command line tools to quickly make configuration changes on an IIS server.

Most of these tools are written with Visual Basic Scripting Edition (VBScript) and are easy to use.

The tools were developed to provide solutions to the most popular administration tasks.

Some tools are not available on older versions of IIS.

The most popular tool, ADsUtil.vbs, does not configure remote servers.

Active Directory Service Interfaces (ADSI)

Use ADSI to programmatically configure IIS in a script or compiled program. Changes take place immediately without a need to stop and start the server.

To force the in-memory metabase to be written to disk, use the SaveData, BackupWithPassword, or Backup methods of the IISComputer object.

Configuring large sites or multiple servers with ADSI is fast and efficient.

ADSI is scriptable. For more information, see ADSI and WMI Providers in IIS.

You can configure IIS 4.0, IIS 5.0, IIS 5.1, and IIS 6.0 with ADSI, as long as you use error checking that can handle missing objects and properties.

You can extend the IIS schema with ADSI, though it is not recommended. Data that is not related to IIS configuration should be kept outside of the metabase.

If you create a site or virtual directory, or use a property that depends on others, you must ensure that you know which supporting properties need to be created and set as well. Use the topics in the Metabase Property Reference to learn if a property depends on others.

When using the IIS ADSI provider from System.DirectoryServices, there is some functionality that is lost due to late binding. However, there are fixes in Service Pack 1 for Windows Server 2003.

Windows Management Instrumentation (WMI)

Use WMI to programmatically configure IIS in a script or compiled program. Changes take place immediately without needing to stop and start the server.

To force the in-memory metabase to be written to disk, use the SaveData, BackupWithPassword, or Backup methods of the IISComputer object.

IIS 5.1 and earlier: The IIS WMI provider is not available.

Configuring large sites or multiple servers with WMI is fast and efficient.

WMI is scriptable. For more information, see ADSI and WMI Providers in IIS.

If you create a site or virtual directory, or use a property that depends on others, you must ensure that you know which supporting properties need to be created and set as well. Use the topics in the Metabase Property Reference to learn if a property depends on others.

WMI can only be used if you are configuring an IIS 6.0 server.

Admin Base Objects (ABO)

Use ABO to programmatically configure IIS in a compiled program written in C, C++, or Visual Basic 6.0.

To force the in-memory metabase to be written to disk, use the SaveData or Backup methods of the IMSAdminBase interface.

Using ABO is the fastest method of configuring IIS. It is faster than using ADSI or WMI because the ADSI and WMI providers are wrappers for ABO. For more information, see Admin Base Objects in IIS.

If you create a site or virtual directory, or use a property that depends on others, you must ensure that you know which supporting properties need to be created and set as well. Use the topics in the Metabase Property Reference to learn if a property depends on others.

ABO is not scriptable. ABO applications can only be written in C++ or Visual Basic 6.0.

Since ABO accesses IIS at the lowest level, it is more difficult to use than ADSI or WMI because there are no methods that compress multiple lines of ABO code into one method call. Also, there are no safeguards to prevent you from configuring invalid settings.

Other specialized interfaces

User other specialized interfaces such as IIISApplicationAdmin, IIisServiceControl, and IWamAdmin to manage IIS services and create applications.

Configuring large sites or multiple servers is fast and efficient.

These interfaces are not scriptable. They can only be written in C++.

These interfaces do not have as much functionality as ADSI or WMI.