HttpHandlersSection Class
.NET Framework 2.0
Configures an HTTP handler for a Web application. This class cannot be inherited.
Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
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 the 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. |
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");
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>
System.Object
System.Configuration.ConfigurationElement
System.Configuration.ConfigurationSection
System.Web.Configuration.HttpHandlersSection
System.Configuration.ConfigurationElement
System.Configuration.ConfigurationSection
System.Web.Configuration.HttpHandlersSection
Community Additions
ADD
Show:
Note: