I have an MVC 2.0 web site that is using Areas. When I go to the default page (localhost/mywebsite/default.aspx), it correctly routes to the correct action in the correct controller and renders the default view correctly.
But on the page I have several Html.ActionLinks, and these do not seem to be able to find the Controller. When I click on the links in the page, I get a 404 error.
The URLs are what I expect: localhost/mywebsite/MyAreaName/Home/Index (for example). I’ve also tried localhost/mywebsite/Areas/MyAreaName/Home/Index, but this also gives me a 404.
How do I get the Controller to be recognized?
You probably don’t have your IIS settings setup correctly to map the requests correctly.
Is IIS verify that you have set the “Wildcard application maps” to:
And make sure you have the “Verify file exists” checkbox unchecked.
Walkthrough – read section “IIS6 Extension-less URLs”
(source: haacked.com)
More information with IIS 6 MVC setup
More IIS Info
EDIT: Since your using IIS 7, verify that it is running in integrated mode. If it is running in classic mode the mapping is NOT done automatically just like the way IIS6 works.