R – ASP.NET MVC routing fails when using default.aspx/controller/action style url

asp.net-mvciis-6routing

I'm deploying an ASP.NET MVC site to a IIS6 webserver, so I'm using a default.aspx/{controller}/{action} style routing strategy.

However, for some reason it doesn't really work when using the default.aspx part. No matter the url, it always gets the default action (Index) on the default controller (Public).

I've been using the excellent Routing Debugger to see what's going on.

route fail http://img169.yfrog.com/img169/7532/routefail.gif

As you can see I'm requesting default.aspx/contact, which should match the 3rd route in the table.
Actually ANYTHING I write after default.aspx/ matches the two last routes in the table (I understand the last one).

I'm getting this behavior on both Cassini and IIS6.

Why is this happening?

Best Answer

RouteTable.Routes.RouteExistingFiles = true;

Now it works. Got the answer from here.

I think this info should have been on the asp.net/mvc site, like this page for instance.