ASP.NET MVC Default URL View

Posted by Moose Factory on Stack Overflow See other posts from Stack Overflow or by Moose Factory
Published on 2010-01-05T14:39:25Z Indexed on 2012/04/10 23:29 UTC
Read the original article Hit count: 271

I'm trying to set the Default URL of my MVC application to a view within an area of my application. The area is called "Common", the controller "Home" and the view "Index".

I've tried setting the defaultUrl in the forms section of web.config to "~/Common/Home/Index" with no success.

I've also tried mapping a new route in global.asax, thus:

routes.MapRoute(
        "Area",
        "{area}/{controller}/{action}/{id}",
        new { area = "Common", controller = "Home", action = "Index", id = "" }
    );

Again, to no avail.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about mvc