1.添加RouteDebug.dll引用;
2.在全局Global文件添加如下代码:
RouteDebug.RouteDebugger.RewriteRoutesForTesting(RouteTable.Routes);
3.在Web.config配置文件中,appSettings节点下添加如下内容(此步可省略):
<add key="RouteDebugger:Enabled" value="true"/>
原文:http://www.cnblogs.com/genesis/p/5245212.html