asp.net.ph

HttpModulesSection Class

System.Web.Configuration Namespace


.NET Framework version 2.0

Configures an HTTP module for a Web application. This class cannot be inherited.

HttpModulesSection Class Members

Collapse   Constructors

Visibility Constructor Parameters
public HttpModulesSection ( )

Collapse   Properties

Visibility Name Value Type Accessibility
public Modules HttpModuleActionCollection [ Get ]

Remarks

The HttpModulesSection class provides a way to programmatically access and modify the httpModules section of a configuration file.

This type is part of a group that includes the HttpModuleAction and HttpModuleActionCollection types.

NOTE: The HttpModulesSection can read and write information from and to the related section of the configuration file according to the section property AllowDefinition whose value is Everywhere.

Example

This example demonstrates how to specify values declaratively for attributes of the add element within the httpModules section, which can also be accessed as members of the HttpModulesSection class.

The following configuration file example shows how to specify values declaratively for the httpModules section.

<httpModules>
   <add name = "TimerModule"
      type = "Samples.Aspnet.Configuration.RequestTimeInterval, 
         RequestTimeInterval Version=1.0.1557.23158, Culture=neutral,
         PublicKeyToken=7bfb33146a87b52e, processorArchitecture=MSIL" />
</httpModules>

The following code example demonstrates how to use the HttpModulesSection class.

// Get the Web application configuration.
Configuration configuration = 
   WebConfigurationManager.OpenWebConfiguration ( "/aspnetTest" );

// Get the HttpModulesSection.
HttpModulesSection httpModulesSection = 
  ( HttpModulesSection ) configuration.GetSection ( "system.web/httpModules" );
  C# VB

See Also

ASP.NET Configuration   <httpModules> Section Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph