我正在考虑在我的 mvc 4 应用程序中设置一个自定义路由,没有默认参数默认值(http://www.asp.net/mvc/tutorials/controllers-and-routing/creating-custom-routes-cs)
我稍微修改了一下:
routes.MapRoute(
"Blog", // Route name
"Archive/{entryDate}" // URL with parameters
);
问题是我在点击时遇到错误:
http://localhost:80/Archive/12-25-2009
The matched route does not include a 'controller' route value, which is required.