model view controller - Introducing MVC into ASP.Net - 404 error -


I have an existing ASP.Net application, in which I am trying to present MVC2.

Hopefully I can remember the steps, but what I did was the following:

  1. Created a dummy MVC 2 project.
  2. Comparisoned and merged. MVC2 items
  3. Comparison and merge web.config
  4. Comparison and merge global.asax.cs
  5. Added model, view and controller directory
  6. This works all Use the application through the root address.

    But, when I use I get a 404 error. I get the same result for any of the controllers / operations I have created, the only way I can get them to appear, is to use the default in routing configuration, I have installed and it is not doing anything

From

Bah ... shows that it is IIS 5.1 And with MVC routing.

I used it in my application using the following routes (Routes, "new", "host", action = "index"}); Routes (Resolved .aspx extension).

  Routes. MapRoute ("default", "{controller} / {action} .aspx", new {controller = "host", action = "index"});  

This means that I Can not do a clean path, but at least it works.


Comments