asp.net.ph

HttpHandlersSection Class

System.Web.Configuration Namespace


.NET Framework version 2.0

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

HttpHandlersSection Class Members

Collapse   Constructors

Visibility Constructor Parameters
public HttpHandlersSection ( )

Collapse   Properties

Visibility Name Value Type Accessibility
public Handlers HttpHandlerActionCollection [ Get ]

Remarks

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

This type is part of a group that includes the HttpHandlerAction and HttpHandlerActionCollection types.

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

Example

The following code example shows how to use the HttpHandlersSection class to access the httpHandlers section of an existing Web application.

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

// Get the section.
System.Web.Configuration.HttpHandlersSection httpHandlersSection = 
  ( System.Web.Configuration.HttpHandlersSection ) configuration.GetSection ( "system.web/httphandlers" );
  C# VB

The following configuration excerpt shows how to specify values declaratively for the httpHandlers section.

<httpHandlers>
   <add path = "Calculator.custom"
      type = "Samples.Aspnet.SystemWebConfiguration.Calculator, CalculatorHandler"
      verb = "GET" validate = "false" />
</httpHandlers> 
See Also

ASP.NET Configuration   <httpHandlers> 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