views:

135

answers:

1

As Phil Haack explains on his blog entry, the Route Debugger helps visualizing your routing tables.
My site however gets it's routing injected by the MVCTurbine dependency injection (using Unity) like so:

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",                                              // Route name
            "{controller}/{action}/{id}",                           // URL with parameters
            new { controller = "Home", action = "Index", id = "" }  // Parameter defaults
            );
        RouteDebug.RouteDebugger.RewriteRoutesForTesting(RouteTable.Routes);
    }
}

Where exactly can I throw in the the RouteDebug.RouteDebugger.RewriteRoutesForTesting(RouteTable.Routes); to rewrite my routing table?

A: 

Sorry Boris, but I don't notified when a question is asked on StackOverflow for the turbine tag. :(

Yes, that's the correct place for putting the RouteDebug piece.

Javier Lozano
No sweat :) Thanks for the reply.Hmm, it didn't work back then. I will check back when at home and update if necessary.
borisCallens