.NET Framework Class Library
UrlRoutingModule Class

Matches a URL request to a defined route.

Namespace:  System.Web.Routing
Assembly:  System.Web.Routing (in System.Web.Routing.dll)
Syntax

Visual Basic (Declaration)
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public Class UrlRoutingModule _
    Implements IHttpModule
Visual Basic (Usage)
Dim instance As UrlRoutingModule
C#
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class UrlRoutingModule : IHttpModule
Visual C++
[AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction::LinkDemand, Level = AspNetHostingPermissionLevel::Minimal)]
public ref class UrlRoutingModule : IHttpModule
JScript
public class UrlRoutingModule implements IHttpModule
Remarks

The UrlRoutingModule class matches an HTTP request to a route in an ASP.NET application. The module iterates through all the routes in the RouteCollection property and searches for a route that has a URL pattern that matches the format of the HTTP request. When the module finds a matching route, it retrieves the IRouteHandler object for that route. From the route handler, the module gets an IHttpHandler object and uses that as the HTTP handler for the current request.

.NET Framework Security

Inheritance Hierarchy

System..::.Object
  System.Web.Routing..::.UrlRoutingModule
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 3.5 SP1
See Also

Reference

Tags :


Community Content

just.a.nerd
Security !

You should be aware that standard asp.net url-authorization will be broken when using routing, since the requested url isn't the one actually being served!

Also note that page relative paths to stylesheets and scripts must be rebased, or the browser can't find them.

Tags :

Page view tracker