As Phil Haack explains in his blog post, the route debugger helps visualize your routing tables.
My site, however, gets its routing injected with MVCTurbine dependency injection (using Unity) as follows:
public class DefaultRoutRegistration : IRouteRegistrator
{
public void Register(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Accounts",
"Accounts/{userName}/{action}",
new { controller = "Account", action = "Index" }
);
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = "" }
);
RouteDebug.RouteDebugger.RewriteRoutesForTesting(RouteTable.Routes);
}
}
Where exactly can I throw in RouteDebug.RouteDebugger.RewriteRoutesForTesting (RouteTable.Routes); rewrite my routing table?
source
share