In my ASP.NET MVC 5 app I have an area defined called Manage.
I am currently using the default route for this area:
context.MapRoute(
"Manage_default",
"Manage/{controller}/{action}/{id}",
new { controller="Home", action = "Index", id = UrlParameter.Optional }
);
The problem I have is when using additional parameters to an action, they are not bound. For example the MonthlyStats action of the Sites controller is defined as public ActionResult MonthlyStats(int id, DateTime? month)
but when hitting /Manage/Sites/MonthlyStats/138/?month=2015-02-01
, month is always null.
/Sites/MonthlyStats/ was only recently moved the the Manage area and it worked perfectly before this.
Looking in RouteDebugger, month is never present in the RouteData collection as I expect is should be (could be wrong here).