
510
|
Chapter 23: The System.Web Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
gives you access to ASP.NET’s built-in objects. Use the IsReusable property to declare
whether a single instance of your handler can serve multiple requests.
You will also need to modify <httphandlers> section of the web.config file to make your
custom handler a target for HTTP requests. You can map requests based on the
requested page, file type, or HTTP method (GET, PUT, or POST). If you want to
create a handler that can process all requests, you should create a custom HttpModule
using the IHttpModule interface.
Implemented By
HttpApplication, IHttpAsyncHandler, System.Web.Services.Discovery.DiscoveryRequest-
Handler, System.Web.UI.Page
Returned By
HttpContext.Handler, IHttpHandlerFactory.GetHandler( ), System.Web.Services.Protocols.
WebServiceHandlerFactory.GetHandler( ), System.Web.UI.PageParser.
GetCompiledPageInstance( )
Passed To
HttpContext.Handler, IHttpHandlerFactory.ReleaseHandler( ), System.Web.Services.Protocols.
WebServiceHandlerFactory.ReleaseHandler( )
IHttpHandlerFactory
System.Web (system.web.dll)
interface
You can implement this interface to create a factory class that can create IHttpHandler
instances dynamically. ASP.NET includes standard IHttpHandlerFactory classes like PageHan-
dlerFactory, RestrictedResourceFactory, and WebServiceHandlerFactory ...