IIS 7.0 Configuration System
Let us step one level higher in our exploration. At the base of Internet Information Services 7.0 in Windows Server 2008, is an innovated and XML-based configuration system is established. Unlike the IIS 6.0 metabase, the entire configuration state is in files and no in-memory configuration store is used. With an administrative protection, the configuration is portable by merely copying it to other Web servers or sharing it. Nevertheless, the same configuration file could now be centrally shared across the Web servers group.
The server-wide configuration setting is stored in applicationHost.config file located at %windir%\System32\inetsrv\config directory which could be delegated in the <system.webServer> section of the root web.config file for application level settings. Moreover, the machine.config and web.config files located at %windir%\Microsoft.NET\Framework\v2.0.50727\CONFIG\ directory remain the global configuration settings for .NET Framework and ASP.NET respectively, and the <system.web> section of the root <web.config> continues to provide the application level settings.
Organization of Settings
The configuration file is logically organized by section. A section is an independent group of settings that defines the operation and extensibility of the server or an application. Being an independent unit, it cannot be nested. Below is an illustration:
<add name="DefaultAppPool" />
<add name="Classic .NET AppPool" managedPipelineMode="Classic" />
<processModel identityType="NetworkService" />
Sections can be assembled into a section group. But unlike a section, a section group does not define any server nor application operation. Its sole purpose is to hierarchically organize logically-related sections. For this reason, it could be nested for further groupings. In the applicationHost.config, the sections groupings are defined through <configSections>. Below is the illustration:
<section name="applicationPools" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
<section name="asp" overrideModeDefault="Deny" />
applicationHost Section Groups
The applicationHost.config, as we have mentioned earlier, contains the server-wide configuration settings/sections that are group into system.applicationHost and system.webServer. The former contains global settings employed by the Windows Process Activation Service, while the later is used by the Web server engine and modules.
Aside from the section groups, we can incorporate a <location> tag in the configuration file. It is often employed for locking and unlocking a configuration section, to manage the application level delegation. It is done by defining the overrideMode value of a specific site. In the illustration below, the default document could not be changed in the root web.config file; otherwise, it would fire an exception.
<location path="Sample Web Site" overrideMode="Deny">
<add value="default.aspx" />
Schema and Other Configuration Files
The configuration system is charted by a declarative schema located at %windir%\System32\inetsrv\config\schema directory, including IIS_schema.xml for IIS configuration settings, ASPNET_schema.xml for ASP.NET configuration settings, and FX_schema.xml for other .NET Framework configuration settings. Note that we need not to make any changes on the schema files. However, if necessary for us to create a custom section, we could add a separate schema file on the same directory.
Aside for the applicationHost.xml file, we could experience the presence of administration.xml and redirection.xml configuration files in the %windir%\System32\inetsrv\config directory. The former holds the settings necessary for the Internet Information Services Manager tool, and the later contains settings necessary to point a Web server to a remote/shared configuration files and schema.
Hoping I have shared something.