I am working on a very simple application, using MVC2 Preview 1.
I have a controller named ContentController. My problem is that /Content/Index works correctly, but /Content/ returns a 404. I am running the application on the Studio Development Server.
Tested with RouteDebugger but /Content/ returns a 404, and does not display any debugging information.
I have not changed the routing code:
       routes.MapRoute(
            "Default",                                              // Route name
            "{controller}/{action}/{id}",                           // URL with parameters
            new { controller = "Home", action = "Index", id = "" }  // Parameter defaults
        );
This is my controller:
public class ContentController : Controller
{
    IRepository _repo = new SimpleRepository("db", SimpleRepositoryOptions.RunMigrations);
    public ActionResult Index()
    {
        var content = _repo.GetPaged<Content>(0, 20);
        return View(content);
    }
                It's a shot in the dark, but do you have a directory named /Content/ as well?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With