How do i use a new Phil's routedebugger
Try to use, but do not understand what should i do for enabling of it.
tried the old style but it doesnt work for me:
protected void Application_Start(object sender, EventArgs e)
{
RegisterRoutes(RouteTable.Routes);
RouteDebug.RouteD开发者_运维技巧ebugger.RewriteRoutesForTesting(RouteTable.Routes);
}
here the link to post: http://haacked.com/archive/2011/04/13/routedebugger-2.aspx
Simply install the NuGet package which will add the assembly reference to your project and you are good to go. It will print route information on the bottom of each page. It uses the microsoft dynamic infrastructure to add an http module at runtime. So all you need is to run the following command in the NuGet package console window:
PM> Install-Package RouteDebugger
and then run your application.
Installing through NuGet adds a line to your web.config. For some reason this didn't happen for me and it didn't work.
Make sure this line is in your "appSettings" in your web.config:
<add key="RouteDebugger:Enabled" value="true"/>
If you are still having problems, make sure you don't have optimizeCompilations="true"
setting in your web.config.
Another possible reason it is not working is that you have the next route:
routes.MapRoute(url: "{*data}", ...);
This route catches all requests where not caught by previous routes.
精彩评论