Click to Rate and Give Feedback

  Switch on low bandwidth view
IIS 7.0: add Element for modules for system.webServer (IIS Settings Schema)

Adds a native or managed module to the modules collection.

Note:

Native modules added to the modules collection must also be in the globalModules collection.

IIS 7.0: configuration Element (IIS Settings Schema)
  IIS 7.0: system.webServer Section Group (IIS Settings Schema)
    IIS 7.0: modules Element for system.webServer (IIS Settings Schema)
      IIS 7.0: add Element for modules for system.webServer (IIS Settings Schema)
<modules>
      <add name="module name" type="managed type" preCondition="conditions" />
</modules>

The following sections describe attributes, child elements, and parent elements for this section.

Attributes

Attribute

Description

name

Required string attribute.

Specifies the unique name of a native or managed module on the Web server.

preCondition

Optional string attribute.

Specifies conditions under which the module will run.

The preCondition attribute can be one or more of the following possible values. If you specify more than one value, separate the values with a comma (,).

Value

Description

bitness32

Specify the bitness32 value when the module is a 32-bit .dll file. IIS should load the handler only for worker processes that run in WOW64 mode (32-bit simulation) on a 64-bit operating system.

bitness64

Specify the bitness64 value when the module is a 64-bit .dll file. IIS should load the handler only for worker processes that run in 64-bit mode.

integratedMode

Specify the integratedMode value when the module should respond only to requests in application pools that are configured to use the integrated request-processing pipeline.

ISAPIMode

Specify the ISAPIMode value when the module should respond only to requests in application pools that are configured to use Classic mode.

managedHandler

Specify the managedHandler value when the module should process requests only for managed resources, such as .aspx files, and should not respond to requests for non-managed resources, such as .html files.

runtimeVersionv1.1

Specify the runtimeVersionv1.1 value when the module should respond only to requests in application pools that are configured to use .NET Framework version 1.1.

runtimeVersionv2.0

Specify the runtimeVersionv2.0 value when the module should respond only to requests in application pools that are configured to use .NET Framework version 2.0.

type

Optional string attribute.

Specifies the managed type of a managed module. The type attribute does not apply to native modules.

Child Elements

None.

Parent Elements

Element

Description

configuration

Specifies the root element in every configuration file that is used by IIS 7.0.

system.webServer

Specifies the top-level section group (in ApplicationHost.config) in which this element is defined.

modules

Specifies configuration settings for modules on a Web server.

Default Configuration

The following default <modules> element is configured in the root ApplicationHost.config file in IIS 7.0 when all the role services are installed. This configuration section inherits the default configuration settings unless you use the <clear> element.

<modules>
   <add name="HttpCacheModule" lockItem="true" />
   <add name="DynamicCompressionModule" lockItem="true" />
   <add name="StaticCompressionModule" lockItem="true" />
   <add name="DefaultDocumentModule" lockItem="true" />
   <add name="DirectoryListingModule" lockItem="true" />
   <add name="IsapiFilterModule" lockItem="true" />
   <add name="ProtocolSupportModule" lockItem="true" />
   <add name="HttpRedirectionModule" lockItem="true" />
   <add name="ServerSideIncludeModule" lockItem="true" />
   <add name="StaticFileModule" lockItem="true" />
   <add name="AnonymousAuthenticationModule" lockItem="true" />
   <add name="CertificateMappingAuthenticationModule" lockItem="true" />
   <add name="UrlAuthorizationModule" lockItem="true" />
   <add name="BasicAuthenticationModule" lockItem="true" />
   <add name="WindowsAuthenticationModule" lockItem="true" />
   <add name="DigestAuthenticationModule" lockItem="true" />
   <add name="IISCertificateMappingAuthenticationModule" lockItem="true" />
   <add name="IpRestrictionModule" lockItem="true" />
   <add name="RequestFilteringModule" lockItem="true" />
   <add name="CustomLoggingModule" lockItem="true" />
   <add name="CustomErrorModule" lockItem="true" />
   <add name="IsapiModule" lockItem="true" />
   <add name="HttpLoggingModule" lockItem="true" />
   <add name="FailedRequestsTracingModule" lockItem="true" />
   <add name="CgiModule" lockItem="true" />
   <add name="FastCgiModule" lockItem="true" />
   <add name="ConfigurationValidationModule" lockItem="true" />
   <add name="OutputCache" type="System.Web.Caching.OutputCacheModule" preCondition="managedHandler" />
   <add name="Session" type="System.Web.SessionState.SessionStateModule" preCondition="managedHandler" />
   <add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule" preCondition="managedHandler" />
   <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" preCondition="managedHandler" />
   <add name="DefaultAuthentication" type="System.Web.Security.DefaultAuthenticationModule" preCondition="managedHandler" />
   <add name="RoleManager" type="System.Web.Security.RoleManagerModule" preCondition="managedHandler" />
   <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" preCondition="managedHandler" />
   <add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule" preCondition="managedHandler" />
   <add name="AnonymousIdentification" type="System.Web.Security.AnonymousIdentificationModule" preCondition="managedHandler" />
   <add name="Profile" type="System.Web.Profile.ProfileModule" preCondition="managedHandler" />
   <add name="UrlMappingsModule" type="System.Web.UrlMappingsModule" preCondition="managedHandler" />
</modules>

The following example adds a native module and a managed module to the configuration.

Note:

Th e lockItem attribute, besides being used to lock any individual element, can also be used on collection elements to lock them specifically within a specified collection. Also, the attribute can be used to lock any entire section.

<modules>
    <add name="ImageModule" lockItem="true" />
   <add name="OutputCache" type="System.Web.Caching.OutputCacheModule" preCondition="managedHandler" />
</modules>

Configuration locations

Machine.config

ApplicationHost.config

Root application Web.config

Application Web.config

Requirements

Microsoft Internet Information Services (IIS) version 7.0

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker