Creates an object that implements the IHttpHandler interface and gives it the request context.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Thetype exposes the following members.
|Equals||Determines whether the specified Object is equal to the current Object. (Inherited from Object.)|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetHttpHandler||Retrieves the HTTP handler by using the specified HTTP context.|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
MVC includes the following handler types:
MvcHandler. This handler is responsible for initiating the ASP.NET pipeline for an MVC application. It receives a Controller instance from the MVC controller factory; this controller handles further processing of the request. Note that even though MvcHandler implements IHttpHandler, it cannot be mapped as a handler (for example, to the .mvc file-name extension) because the class does not support a parameterless constructor. (Its only constructor requires a RequestContext object.)
. This class implements IRouteHandler, therefore it can integrate with ASP.NET routing. The class associates the route with an MvcHandler instance. A instance is registered with routing when you use the MapRoute method. When the class is invoked, the class generates an MvcHandler instance using the current RequestContext instance. It then delegates control to the new MvcHandler instance.
MvcHttpHandler. This handler is used to facilitate direct handler mapping without going through the routing module. This is useful if you want to map a file-name extension such as .mvc directly to an MVC handler. Internally, MvcHttpHandler performs the same tasks that ASP.NET routing ordinarily performs (going through and MvcHandler). However, it performs these tasks as a handler instead of as a module. This handler is not typically used when the UrlRoutingModule is enabled for all requests.