I have an existing ASP.Net Application, into which I am attempting to introduce MVC2.
Hopefully I can remember the steps, but what I did was the following:
- Created a dummy MVC2 project.
- Compared and merged .csproj, resulting in the Add Item commands showing MVC2 items.
- Compared and merged the web.config
- Compared and merged the global.asax.cs
- Added Models, Views and Controllers directories
- Added HostController with Index action and Index.aspx (no logic)
- Amended route to make /Host/Index the default
So now, when I access the application via the root address http://localhost/MyApp it all works.
But, when I access http://localhost/MyApp/Host/Index I get a 404 error. I get the same result for any of the Controller/Actions I created. The only way I can get them to appear is to use the defaults in the routing configuration. I installed Phill Haack's route debugger and it's doing nothing. Obviously there's some problem with my routing, but I can't figure it out.
Any ideas what I've missed?