Name
IHttpHandlerFactory
Synopsis
You can implement this interface to create a factory class that can create IHttpHandler
instances dynamically. ASP.NET includes standard IHttpHandlerFactory
classes like PageHandlerFactory
, RestrictedResourceFactory
, and WebServiceHandlerFactory
(which are not
shown in the class library documentation because they are private types).
Using the <httphandlers>
section of the
web.config
file, you can map specific requests to
directly to an IHttpHandler
class or to
an IHttpHandlerFactory
class, which will
dynamically create an appropriate IHttpHandler
class by using the GetHandler()
method.
Note that the standard factory classes used by ASP.NET do not appear in
the MSDN help or this reference. These classes are marked Private
and are used exclusively by the ASP.NET framework.
Public Interface IHttpHandlerFactory ' Public Instance Methods Public Function GetHandler(ByVal context As HttpContext, ByVal requestType As String, ByVal url As String, ByVal pathTranslated As String) As IHttpHandler Public Sub ReleaseHandler(ByVal handler As IHttpHandler) End Interface
Get ASP.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.