<add> Element for <httpModules>

Adds a module to a Web application.


<add name="ModuleName"
     type=".NET Class, Assembly [,Version=version number] 
           [,Culture=culture] [,PublicKeyToken=token]"/>

Required Attributes

Attribute Description
name Provides a friendly name for the module. This enables you to associate an event handler for module events within the global.asax file.
type Specifies a comma-separated class/assembly combination consisting of version, culture, and public key tokens. ASP.NET searches for the assembly DLL first in the application's private \bin directory and then in the system assembly cache.


The <add> directives are processed in top-down sequential order. If two or more <add> subtags specify the same verb/path combination, the final <add> overrides all others.


The following example adds a module to an application.

         <add name="OutputCache"
              type="System.Web.Caching.OutputCacheModule, System.Web,
                    Version=1.0.2800.0, Culture=neutral,


Contained Within: <system.web>

Web Platform: IIS 5.0, IIS 5.1, IIS 6.0

Configuration File: Machine.config, Web.config

Configuration Section Handler: System.Web.Configuration.HttpModulesConfigurationHandler

See Also

<HttpModules> Element | ASP.NET Configuration | ASP.NET Settings Schema