ASP.NET MVC – the incoming request does not match any route

I spent way too long investigating a problem where a local site built with ASP.NET MVC beta was working perfectly (well… ish), but after deploying the site to a web server running IIS6 I was getting a couple of weird symptoms.

The first was that navigating the the root of the site was throwing an exception – ‘The incoming request does not match any route’. Any other type of request was returning a 404 error (for example navigating to /Accounts).

The problem turned out to be that I was packaging up the files to deploy via msbuild, and I’d failed to include global.asax. This meant the file wasn’t deployed, therefore no routes were set up in the route table.

Based on this , the a request to the root of the site correctly failed to map to any valid route, and no other requests were getting mapped to the Controller classes / action methods, so were returning a 404.

Relevant thread on Stackoverflow…

Posted:

November 13, 2008 @ 10:23

Categories:

Development

Tags:

Comments:

No comments so far

Comments RSS feed for comments on this post.

No comments yet.

Leave a comment