Editing Internet Information Services (IIS) 7.0 configuration files

Introduction

Internet Information Services (IIS) 7.0 stores global, or computer-wide, configuration settings in the %SYSTEMROOT%\system32\inetsrv\config\ApplicationHost.config file. This XML file contains two major configuration section groups:

  • The system.applicationHost section group contains settings for sites, applications, virtual directories, and application pools on your computer, regardless of whether they are part of your web server.

  • The system.webServer section group contains all configuration settings for the IIS 7.0 web server on your computer. For example, this section group is where you configure global web server defaults, web server security, and HTTP compression for files on your web server. You can also store configuration settings for specific sites or applications in this file.

Because IIS 7.0 configuration is based on the Microsoft .NET Framework configuration, you can use a web.config file to store both IIS 7.0 and ASP.NET configuration settings. This XML file contains local configuration settings for a website, web application, URL, or physical or virtual directory on your web server. This file is stored in the directory where the code and content for your website or web application is stored.

Using IIS Manager for IIS 7.0

The new IIS 7.0 IIS Manager for IIS 7.0 user interface provides task-based access to IIS and ASP.NET configuration files. For more information about IIS Manager for IIS 7.0, go to IIS 7.0: Internet Information Services (IIS) Manager on the Microsoft TechNet website.

Using a text editor

Because IIS 7.0 configuration files are written as XML files, you can edit them by using a text editor or Microsoft Visual Studio.

Using appcmd

IIS 7.0 introduces a powerful command-line utility named appcmd. You can use this utility to perform the following tasks:

  • Create sites, applications, and virtual and physical directories.

  • Export and import site configuration.

  • Search for sites, applications, and virtual and physical directories.

Using WMI scripts

A new Windows Management Instrumentation (WMI) provider supports scripting for all IIS 7.0 and ASP.NET configurations. For more information about how to use WMI scripts to configure IIS 7.0, go to IIS 7.0: Managing Configuration Files in IIS 7.0 on the Microsoft TechNet website.