HttpHandlerAction Class

Represents an ASP.NET HTTP handler.

Syntax

class HttpHandlerAction : CollectionElement  

Methods

This class contains no methods.

Properties

The following table lists the properties exposed by the HttpHandlerAction class.

Name Description
Path A read-only string value that contains the path of a single URL or a wildcard string. A key property.
Type A read/write string value that specifies a managed type for an HTTP handler. ASP.NET searches for the handler assembly DLL in the application's private \Bin directory first and then in the system assembly cache. Note: The type reference is formed as follows (items in brackets are not required): Namespace.Typename, Assemblyname[,] [Version=x,] [Culture=y,] [PublicKeyToken=z] (for example, "ExampleNamespace.ExampleType, Example.Assembly, Version=%ASSEMBLY_VERSION%, Culture=neutral, PublicKeyToken=%MICROSOFT_PUBLICKEY%").
Validate A read/write boolean value. true if ASP.NET waits to load the handler class until a matching request arrives; otherwise false. The default is true.
Verb A read-only string value that specifies a comma-delimited list of HTTP verbs (for example, "GET, PUT, POST"). A wildcard ("*") represents all verbs. A key property.

Subclasses

This class contains no subclasses.

Remarks

Instances of this class are contained in the HttpHandlers property of the HttpHandlersSection class.

The HTTP handlers represented by the HttpHandlerAction class are specific to ASP.NET and are in the <system.web> section of the Web.config file. These handlers are contained in the HttpHandlersSection class.

The HTTP handlers represented by the HandlerAction class are related to IIS 7 and are in the <system.webServer> section of the ApplicationHost.config file. These handlers are contained in the HandlersSection class.

Example

The following example displays the HttpHandlerAction instances that are contained in the HttpHandlers property of the HttpHandersSection object.

' 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 HttpHandlerAction instances contained in the  
' HttpHandlers property of HttpHandlersSection.  
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

CollectionElement

HttpHandlerAction

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

CollectionElement Class
HandlerAction Class
HandlersSection Class
HttpHandlersSection Class