나는 가지고있는 영역에서 작동하는 경로를 얻으려고 애 쓰고 있습니다.mvc4 영역 내에서 라우팅 동작이 동작을 매핑 할 수 없습니다.
내 영역을 ABC라고하며이 영역 내에 홈이라는 컨트롤러가 있습니다. "http : // localhost : 8000/abc"를 탐색하면 홈/색인으로 중단 점을 맞출 수 있습니다. 그러나 "http : // localhost : 8000/ABC/details"와 같은 세부 정보라는 다른 작업을 시도 할 때 얻을 수 있습니다. 이상적으로
context.MapRoute(
"details",
"Home/Home/{action}/{id}",
new {controller="home", action = "details", id = UrlParameter.Optional },
constraints: null,
namespaces: new[] { "WebApplication.Areas.ABC.Controllers" }
);
을 (404)
내가
context.MapRoute(
"details",
"ABC/Home/{action}/{id}",
new { action = "details", id = UrlParameter.Optional },
constraints: null,
namespaces: new[] { "WebApplication.Areas.ABC.Controllers" }
);
context.MapRoute(
"ABC_Home",
"ABC/{controller}/{action}/{id}",
new { controller = "home",action="Index", id = UrlParameter.Optional },
constraints: null,
namespaces: new[] { "WebApplication.Areas.ABC.Controllers" }
);
을 시도 이것은 내가 "8000/ABC/홈/세부 경우 http : // localhost :"사용하는 경우 나 조치를 칠 수 있습니다 나는 가능하다면 URL 내에서 집을 사용하고 싶지 않다. 내가 도대체 뭘 잘못하고있는 겁니까?
도움이 될 것입니다!
감사합니다 dbaseman Logged –