ASP.NET Routing Debugger
时间:2010-10-01 来源:吴X
http://haacked.com/archive/2008/03/13/url-routing-debugger.aspx#related-results
To use this, simply download the following zip file and place the assembly inside of it into your bin folder. Then in your Global.asax.cs file add one line to the Application_Start method (in bold).
protected void Application_Start(object sender, EventArgs e) { RegisterRoutes(RouteTable.Routes); RouteDebug.RouteDebugger.RewriteRoutesForTesting(RouteTable.Routes); }
This will update the route handler (IRouteHandler) of all your routes to use a DebugRouteHandler instead of whichever route handler you had previously specified for the route. It also adds a catch-all route to the end to make sure that the debugger always matches any request for the application.
相关阅读 更多 +
排行榜 更多 +