Table of Contents

Class MvcHandler

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

Selects the controller that will handle an HTTP request.

public class MvcHandler : IHttpAsyncHandler, IHttpHandler, IRequiresSessionState
Inheritance
MvcHandler
Implements
IHttpAsyncHandler
IHttpHandler
IRequiresSessionState
Inherited Members

Constructors

MvcHandler(RequestContext)

Initializes a new instance of the MvcHandler class.

public MvcHandler(RequestContext requestContext)

Parameters

requestContext RequestContext

The request context.

Exceptions

ArgumentNullException

The requestContext parameter is null.

Fields

MvcVersionHeaderName

Contains the header name of the ASP.NET MVC version.

public static readonly string MvcVersionHeaderName

Field Value

string

Properties

DisableMvcResponseHeader

Gets or sets a value that indicates whether the MVC response header is disabled.

public static bool DisableMvcResponseHeader { get; set; }

Property Value

bool

true if the MVC response header is disabled; otherwise, false.

IsReusable

Gets a value that indicates whether another request can use the System.Web.IHttpHandler instance.

protected virtual bool IsReusable { get; }

Property Value

bool

true if the System.Web.IHttpHandler instance is reusable; otherwise, false.

RequestContext

Gets the request context.

public RequestContext RequestContext { get; }

Property Value

RequestContext

The request context.

Methods

AddVersionHeader(HttpContextBase)

Adds the version header by using the specified HTTP context.

protected virtual void AddVersionHeader(HttpContextBase httpContext)

Parameters

httpContext HttpContextBase

The HTTP context.

BeginProcessRequest(HttpContext, AsyncCallback, object)

Called by ASP.NET to begin asynchronous request processing.

protected virtual IAsyncResult BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, object state)

Parameters

httpContext HttpContext

The HTTP context.

callback AsyncCallback

The asynchronous callback method.

state object

The state of the asynchronous object.

Returns

IAsyncResult

The status of the asynchronous call.

BeginProcessRequest(HttpContextBase, AsyncCallback, object)

Called by ASP.NET to begin asynchronous request processing using the base HTTP context.

protected virtual IAsyncResult BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, object state)

Parameters

httpContext HttpContextBase

The HTTP context.

callback AsyncCallback

The asynchronous callback method.

state object

The state of the asynchronous object.

Returns

IAsyncResult

The status of the asynchronous call.

EndProcessRequest(IAsyncResult)

Called by ASP.NET when asynchronous request processing has ended.

protected virtual void EndProcessRequest(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

The asynchronous result.

ProcessRequest(HttpContext)

Processes the request by using the specified HTTP request context.

protected virtual void ProcessRequest(HttpContext httpContext)

Parameters

httpContext HttpContext

The HTTP context.

ProcessRequest(HttpContextBase)

Processes the request by using the specified base HTTP request context.

protected virtual void ProcessRequest(HttpContextBase httpContext)

Parameters

httpContext HttpContextBase

The HTTP context.