ASP.NET MVC 解决区域和全局控制器同名的问题

public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
//解决区域和全局控制器同名的问题
namespaces: new string []{"Web.Areas.m.Controllers"}
);
}

原文地址:https://www.cnblogs.com/cnhonker/p/7397338.html