StopRoutingHandler StopRoutingHandler StopRoutingHandler StopRoutingHandler Class


Provides a way to specify that ASP.NET routing should not handle requests for a URL pattern.

public ref class StopRoutingHandler : System::Web::Routing::IRouteHandler
public class StopRoutingHandler : System.Web.Routing.IRouteHandler
type StopRoutingHandler = class
    interface IRouteHandler
Public Class StopRoutingHandler
Implements IRouteHandler


The following example shows how to prevent routing from handling requests for .axd requests.

routes.Add(new Route("{resource}.axd/{*pathInfo}", new StopRoutingHandler()));
routes.Add(New Route("{resource}.axd/{*pathInfo}", New StopRoutingHandler()))


The StopRoutingHandler class enables you to specify that ASP.NET routing should not handle certain URL requests. You prevent routing from handling certain requests by defining a route and specifying that the StopRoutingHandler class should be used to handle that route's pattern. When a request is handled by a StopRoutingHandler object, the StopRoutingHandler object blocks any additional processing of the request as a route. Instead, the request is processed as an ASP.NET page, Web service, or other ASP.NET endpoint.


StopRoutingHandler() StopRoutingHandler() StopRoutingHandler() StopRoutingHandler()

Initializes a new instance of the StopRoutingHandler class.


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

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

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetHttpHandler(RequestContext) GetHttpHandler(RequestContext) GetHttpHandler(RequestContext) GetHttpHandler(RequestContext)

Returns the object that processes the request.

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)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

IRouteHandler.GetHttpHandler(RequestContext) IRouteHandler.GetHttpHandler(RequestContext) IRouteHandler.GetHttpHandler(RequestContext) IRouteHandler.GetHttpHandler(RequestContext)

Returns the object that processes the request.

Applies to

See also