StopRoutingHandler Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.
Stop |
Initializes a new instance of the StopRoutingHandler class. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Returns the object that processes the request. |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string that represents the current object. (Inherited from Object) |
IRoute |
Returns the object that processes the request. |
Продукт | Версии |
---|---|
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Обратна връзка за .NET
.NET е проект с отворен код. Изберете връзка, за да предоставите обратна връзка: