Elczar 的个人资料Sharing Points { }照片日志列表 工具 帮助

日志


11月12日

IIS 7.0 Configuration System

 

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.

Configuration Levels

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:

<applicationPools>

            <add name="DefaultAppPool" />

            <add name="Classic .NET AppPool" managedPipelineMode="Classic" />

            <applicationPoolDefaults>

                <processModel identityType="NetworkService" />

            </applicationPoolDefaults>

</applicationPools>

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:

<configSections>

<sectionGroup name="system.applicationHost">

<section name="applicationPools" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />

</sectionGroup>

<sectionGroup name="system.webServer">

      <section name="asp" overrideModeDefault="Deny" />

     

</sectionGroup>

</configSections>

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">

            <system.webServer>

                  <defaultDocument enabled="true">

                        <files>

                              <clear />

                              <add value="default.aspx" />

                        </files>

                  </defaultDocument>

            </system.webServer>

      </location>

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.

 

 

 

 

评论

请稍候...
很抱歉,您输入的评论太长。请缩短您的评论。
您没有输入任何内容,请重试。
很抱歉,我们当前无法添加您的评论。请稍后重试。
若要添加评论,需要您的家长授予您相应权限。请求权限
您的家长禁用了评论功能。
很抱歉,我们当前无法删除您的评论。请稍后重试。
您已超过了一天之内允许提供的评论数上限。请在 24 小时后重试。
因为我们的系统表明您可能在向其他用户提供垃圾评论,您的帐户已禁用了评论功能。如果您认为我们错误地禁用了您的帐户,请联系 Windows Live 支持部门
完成下面的安全检查,您提供评论的过程才能完成。
您在安全检查中键入的字符必须与图片或音频中的字符一致。
AdameElcza​r 在此页禁用了评论功能。

引用通告 (1)

此日志的引用通告 URL 是:
http://elczara.spaces.live.com/blog/cns!554EC06D366AC9D5!263.trak
引用此项的网络日志