I know it is late for the OP but for anyone else trying to debug 404 errors I've found a way to intercept the route result and see why it is failing to find the resource.
In Global.asax.cs
override Init like this:
public override void Init()
{
base.Init();
this.AcquireRequestState += showRouteValues;
}
protected void showRouteValues(object sender, EventArgs e)
{
var context = HttpContext.Current;
if (context == null)
return;
var routeData = RouteTable.Routes.GetRouteData(new HttpContextWrapper(context));
}
The routeData
variable will hold the route info as it is being interpreted. I've tested this on MVC5.
I originally bumped into this method in another answer by Paul Evans, this is the link (thanks to @porcus for finding it): stackoverflow.com/a/25466524