Maps incoming requests to the appropriate IHttpHandler class, based on the URL and HTTP verb specified in the request. Unlike the mapping in the <httphandlerfactories> element, the HTTP handler mappings are not inherited. Thus, setting values for this element at the machine level are meaningless.
<httphandlers> <add verb="[verb list]" path="[path/wildcard]" type="[Assembly]#[NGWS Class] " /> <remove verb="[verb list]" path="[path/wildcard]" /> <clear /> </httphandlers>
The directives and attributes are shown in the following table.
Directive | Attribute | Description |
---|---|---|
add | Enables administrator to add a verb/path mapping to an IHttpHandler or IHttpHandlerFactory class.
Note that if an identical verb/path has been specified earlier (for example – in a Config.web file in a parent directory), the second call to add will override the previous setting. |
|
verb | The verb-list can either be a comma-separated list of HTTP verbs (for example: “GET,PUT,POST”) or a start-script mapping (for example: "*") | |
path | The path attribute can either contain a single URL path or a simple wildcard (for example: *.aspx). Full wildcard regular expressions are not supported in PDC Tech Preview. | |
type | The type attribute value is composed of an assembly plus a class combination (where the two values are separated by a '#' character). The assembly DLL is always resolved first against an application’s private "bin" directory, and then against the system assembly cache. | |
remove | Removes a verb/path mapping to an IHttpHandler or an IhttpHandlerFactory class.
The remove directive must exactly match the verb/path combination of a previous add directive in order to remove an entry (wildcards are not supported). |
|
clear | Removes all IHttpHandlerFactory mappings currently configured or inherited by a particular Config.web file. |
If an identical verb/path combination is specified by two or more <add> sub-elements, the last <add> will override all others.
<configsections> <add name="httphandlers" type="System.Web.Config.HttpHandlersConfigHandler"/> </configsections> <httphandlers> <add verb="*" path="MyApp.Scott" type="MyApp.dll#MyApp.Scott" /> <add verb="*" path="MyApp.Baz" type="MyApp.dll#MyApp.Baz" /> </httphandlers>
Contained Within: <configuration>
Web Platform: IIS 5.0
Configuration File: config.web
Configuration Section Handler: System.Web.Config.HttpHandlersConfigHandler
ASP+ Configuration Concepts