let's say I have this master controller in my MVC app:
[RouteArea("Blog")]
public class PageController : BaseAppController
{
}
[RouteArea]
// Called on mydomain/Blog
// and also called on mydomain/
public class BaseAppController : Controller
{
[Route]
public ActionResult Index()
{
return Content("this is the index file form the main controller");
}
}
as it is expected, I will get that Index
action on mydomain/Blog
, but for some reason I get it also in my /
which it conflicts with another view I have from another controller.
I do not have any default set up for any of my roots:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.LowercaseUrls = true;
routes.MapMvcAttributeRoutes(new CustomDirectRouteProvider());
}
any idea what's the problem?