RedirectToAction Causes "No route in the route table matches the supplied values" in ASP.NET MVC 3

I ran into this with areas within MVC3 when redirecting across areas. As others have said, Glimpse is very useful here.

The solution for me was to pass in the Area within the route values parameter changing:

return RedirectToAction("ActionName", "ControllerName");

to:

return RedirectToAction("ActionName", "ControllerName", new { area = "AreaName" });

I had a similar problem once with RedirectToAction and found out that you need a valid route registered that leads to that action.


Check out glimpse and see if you can get some route debugging information: http://getglimpse.com/