PageHandlerFactory PageHandlerFactory PageHandlerFactory PageHandlerFactory Class

Definition

Creates instances of classes that inherit from the Page class and implement the IHttpHandler interface. Instances are created dynamically to handle requests for ASP.NET files. The PageHandlerFactory class is the default handler factory implementation for ASP.NET pages.

public ref class PageHandlerFactory
public class PageHandlerFactory
type PageHandlerFactory = class
    interface IHttpHandlerFactory
Public Class PageHandlerFactory
Inheritance
PageHandlerFactoryPageHandlerFactoryPageHandlerFactoryPageHandlerFactory

Remarks

The PageHandlerFactory class implements the IHttpHandlerFactory interface to provide the default HTTP handler for ASP.NET files. The PageHandlerFactory calls the ASP.NET compilation system to compile, if necessary, and return the exact type corresponding to the URL, and then creates an instance of that type. The page type inherits from the Page class and implements the IHttpHandler interface.

To build a custom page handler factory, implement the IHttpHandlerFactory and register the custom PageHandlerFactory class in the Web.config file for the application in the httpHandlers Element (ASP.NET Settings Schema) configuration section.

Constructors

PageHandlerFactory() PageHandlerFactory() PageHandlerFactory() PageHandlerFactory()

Initializes a new instance of the PageHandlerFactory class.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHandler(HttpContext, String, String, String) GetHandler(HttpContext, String, String, String) GetHandler(HttpContext, String, String, String) GetHandler(HttpContext, String, String, String)

Returns an instance of the IHttpHandler interface to process the requested resource.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ReleaseHandler(IHttpHandler) ReleaseHandler(IHttpHandler) ReleaseHandler(IHttpHandler) ReleaseHandler(IHttpHandler)

Enables a factory to reuse an existing instance of a handler.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See Also