Редагувати

Поділитися через


StopRoutingHandler Class

Definition

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
Inheritance
StopRoutingHandler
Implements

Examples

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

Remarks

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.

Constructors

StopRoutingHandler()

Initializes a new instance of the StopRoutingHandler class.

Methods

Equals(Object)

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

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetHttpHandler(RequestContext)

Returns the object that processes the request.

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)

Explicit Interface Implementations

IRouteHandler.GetHttpHandler(RequestContext)

Returns the object that processes the request.

Applies to

See also