NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

<httphandlerfactories> Section Handler

Maps incoming requests to the appropriate IHttpHandlerFactory class, based on the URL and HTTP verb specified in the request. Unlike the mapping in the <httphandler> element, the HTTP handler factory mappings are inherited.

Administrators can configure the <httphandlerfactories> section using three sub-tag directives: “add”, “remove” and “clear” that are interpreted/processed in top-down sequential order.

<httphandlerfactories>
   <add verb="verb list" path="path" type="assembly#NGWS class" />
   <remove verb="verb list" path="path" />
   <clear />
</httphandlerfactories>

The <add> and <remove> sub-elements contain three attributes.

Directive Attribute Description
add   Adds a verb/path mapping to an 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 be either a comma-separated list of HTTP verbs (for example: “GET, PUT, POST”) or an '*', which indicates all HTTP verbs.
  path Specifies the URL path or wildcard that maps to the HTTP handler factory class. The value can be either a single URL path, or a simple wildcard (for example, "*.aspx"). Full wildcard regular expressions are not supported in PDC Tech Preview.
  type The class that implements IHttpHandlerFactory. The value is composed of an assembly and class name combination, 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 IHttpHandlerFactory class.

Note that 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.

Example

<configsections>
   <add name="httphandlerfactories"
        type="System.Web.Config.HttpHandllerFactoriesConfigHandler"/>
</configsections>

<httphandlerfactories>
   <add verb=”GET,POST,PUT” 
        path="*.aspx"
        type="System.Web.Pages.PageFactory" />
   <add verb=”*” 
        path="*.scottgu" 
        type="Scottgu.dll#ScottGuFactory" />
   <add verb=”*” 
        path="*.asax" 
        type="System.Web.RestrictedResourceHandler" />
</httphandlerfactories>

Requirements

Contained Within: <configuration>

Web Platform: IIS 5.0

Configuration File: config.web

Configuration Section Handler:

System.Web.Config.HttpHandlerFactoriesConfigHandler

See Also

ASP+ Configuration Concepts