HttpHandlersSection Class
Configures settings for ASP.NET handlers.
Syntax
class HttpHandlersSection : ConfigurationSectionWithCollection
Methods
The following table lists the methods exposed by the HttpHandlersSection
class.
Name | Description |
---|---|
Add | (Inherited from ConfigurationSectionWithCollection.) |
Clear | (Inherited from ConfigurationSectionWithCollection .) |
Get | (Inherited from ConfigurationSectionWithCollection .) |
GetAllowDefinition | (Inherited from ConfigurationSection.) |
GetAllowLocation | (Inherited from ConfigurationSection .) |
Remove | (Inherited from ConfigurationSectionWithCollection .) |
RevertToParent | (Inherited from ConfigurationSection .) |
SetAllowDefinition | (Inherited from ConfigurationSection .) |
SetAllowLocation | (Inherited from ConfigurationSection .) |
Properties
The following table lists the properties exposed by the HttpHandlersSection
class.
Name | Description |
---|---|
HttpHandlers |
An array of HttpHandlerAction values that contain ASP.NET handlers. |
Location |
(Inherited from ConfigurationSection .) A key property. |
Path |
(Inherited from ConfigurationSection .) A key property. |
SectionInformation |
(Inherited from ConfigurationSection .) |
Subclasses
This class contains no subclasses.
Remarks
The HTTP handlers contained in the HttpHandlersSection
class are specific to ASP.NET and are in the <system.web>
section of the Web.config file. Each of these handlers is represented by an instance of the HttpHandlerAction
class.
The HTTP handlers in the HandlersSection class are related to IIS 7 and are in the <system.webServer>
section of the ApplicationHost.config file. Each of these handlers is represented by an instance of the HandlerAction class.
Example
The following example displays HttpHandlersSection
properties, including the HttpHandlerAction
values that are in the HttpHandlers
property.
' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")
' Get the HttpHandlersSection.
Set oSite = oWebAdmin.Get("Site.Name='Default Web Site'")
oSite.GetSection "HttpHandlersSection", oSection
' Display the Path and Location properties.
WScript.Echo "Path: " & oSection.Path
WScript.Echo "Location: " & oSection.Location
WScript.Echo
' Display the HttpHandlerAction instances that are contained
' in the HttpHandlers property.
WScript.Echo "----------( Http Handlers )----------"
Counter = 0
For Each oHttpHandler In oSection.HttpHandlers
Counter = Counter + 1
WScript.Echo "[" & Counter & "] Path: " & oHttpHandler.Path
WScript.Echo "Type: " & oHttpHandler.Type
WScript.Echo "Validate: " & oHttpHandler.Validate
WScript.Echo "Verb: " & oHttpHandler.Verb
WScript.Echo
Next
Inheritance Hierarchy
ConfigurationSectionWithCollection
HttpHandlersSection
Requirements
Type | Description |
---|---|
Client | - IIS 7.0 on Windows Vista - IIS 7.5 on Windows 7 - IIS 8.0 on Windows 8 - IIS 10.0 on Windows 10 |
Server | - IIS 7.0 on Windows Server 2008 - IIS 7.5 on Windows Server 2008 R2 - IIS 8.0 on Windows Server 2012 - IIS 8.5 on Windows Server 2012 R2 - IIS 10.0 on Windows Server 2016 |
Product | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 |
MOF file | WebAdministration.mof |
See Also
ConfigurationSectionWithCollection Class
HandlerAction Class
HandlersSection Class
HttpHandlerAction Class