나는 이것을 알 수 없다.MVC C# 컨트롤러 충돌 (사이트 관리자와 사이트 전면)
어떻게 문제를 해결할 수 있습니까? RegisterArea
로 영역을 선언 할 때
AdminAreaReistration CS
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"CMSAdmin_default",
"CMSAdmin/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional }
);
}
RouteConfig
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Default", action = "Index", id = UrlParameter.Optional }
);
}
어떻게 오류가 생성되는? 특정 URL로 이동하려고하거나 'Url.Action'과 같은 URL을 생성하려고합니까? –