0

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?

1 Answer 1

1
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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.