
直接上图
VS 2017 安装示意图
安装好手动启用或关闭
我开始调试我之前程序中由于路由遇到的问题 当发出 http://localhost:2362/109.html 这样请求, 我的意图是想Article的Details被执行到,可是....
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
//文章路由
routes.MapRoute(
name: "Article",
url: "{id}.html",
defaults: new { controller = "Article", action = "Details", id = UrlParameter.Optional },
namespaces: new[] { "NewsLetter.Controllers" }
);
一看, http://localhost:2362/109.html 这样的请求,第一匹配的还是Default 路由, 至于匹配成什么, Route Debugger很好地说明 了.接着, 我将Default路由和Article路由顺序前后交换一下.
其它:RouteDebug.dll