I just updated my Asp.Net Mvc 2 project to Mvc 3 and suddenly my links stopped working. When I open a page, all links on the page redirect back to itself.
Also, some redirects to actions that used to work in the previous version don't working anymore. It keeps saying 'No route in the route table matches the supplied values.'. I used RouteDebug to see what was going on, but couldn't find any problems.
Update
Here's one of the routes i'm using:
// ** Standard route. **
context.MapRoute(
"group_default", // Route name
"{language}/{organisation}/Research.aspx/{controller}/{action}/{organisationId}/{parameter}/",
// URL with parameters
new
{
area = "research",
language = "en-US",
organisation = "",
controller = "Home",
action = "Index",
organisationId = UrlParameter.Optional,
parameter = UrlParameter.Optional
}, // Parameter defaults
new[] { "Project.Web.Areas.Research.Controllers" }
);
As you can see in my answer below, the problem was caused by two UrlParameter.Optional after each other. This is a bug in Mvc 3