Export (0) Print
Expand All

DefaultHttpHandler Class

Represents the properties and methods of a default HTTP handler.

System.Object
  System.Web.DefaultHttpHandler

Namespace:  System.Web
Assembly:  System.Web (in System.Web.dll)

type DefaultHttpHandler =  
    class 
        interface IHttpAsyncHandler 
        interface IHttpHandler 
    end

The DefaultHttpHandler type exposes the following members.

  NameDescription
Public methodDefaultHttpHandlerInitializes a new instance of the DefaultHttpHandler class.
Top

  NameDescription
Protected propertyContextGets the context that is associated with the current DefaultHttpHandler object.
Protected propertyExecuteUrlHeadersGets a collection of request headers and request values to transfer along with the request.
Public propertyIsReusableGets a Boolean value indicating that another request can use the current instance of the DefaultHttpHandler class.
Top

  NameDescription
Public methodBeginProcessRequestInitiates an asynchronous call to the HTTP handler.
Public methodEndProcessRequestProvides an end method for an asynchronous process.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodOnExecuteUrlPreconditionFailureCalled when preconditions prevent the DefaultHttpHandler object from processing a request.
Public methodOverrideExecuteUrlPathOverrides the target URL for the current request.
Public methodProcessRequestEnables a DefaultHttpHandler object to process of HTTP Web requests.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

A DefaultHttpHandler object intercepts incoming requests in the HTTP pipeline when both request interception has been configured through Internet Information Services (IIS) 6.0 and no explicit httpHandlers bindings apply to the requested extension.

Request interception can be set up through the wildcard application mapping feature introduced in IIS 6.0. For more information, search the MSDN Library for information about using wildcard application maps to remap a URL.

The DefaultHttpHandler class implements the IHttpAsyncHandler interface to provide asynchronous request processing. For general information about HTTP handlers, see HTTP Handlers and HTTP Modules Overview. Additionally, for more information see the following:

Classes can derive from the DefaultHttpHandler class to provide customized handling of requests. An asynchronous HTTP handler that is derived from the DefaultHttpHandler could override the BeginProcessRequest method to change how requests are processed.

A DefaultHttpHandler does not use ASP.NET errors. Existing content that uses IIS errors or a propriety ISAPI custom error mechanism would work unchanged.

The following code example demonstrates how to implement a customized HTTP handler by deriving from the DefaultHttpHandler class.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft