내 동적 데이터 사이트가 ASP.NET MVC 프로젝트에서 실행되도록하려면 올바른 Global.asax 설정이 필요합니다. 라우팅은 현재 내 문제인 것으로 보입니다. 내가 사용하려고 해요동적 데이터 웹 폼 페이지에서 ASP.NET MVC 앱 라우팅이 작동하지 않습니다.
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
MetaModel model = new MetaModel();
model.RegisterContext(typeof(Models.DBDataContext), new ContextConfiguration() { ScaffoldAllTables = true });
routes.Add(new DynamicDataRoute("DD/{table}/{action}.aspx") {
Constraints = new RouteValueDictionary(new { action = "List|Details|Edit|Insert" }),
Model = model
});
routes.MapRoute(
"Assignment",
"Assignment/{action}/{page}",
new { controller = "Assignment", action = "Index", page = "" });
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Admin", action = "Index", id = "" }); // Parameter defaults
}
링크는 다음과 같습니다 :
내가 무엇입니까 여기
내 Global.asax에있다 다음 메시지 :
'/'응용 프로그램의 서버 오류입니다. 리소스를 찾을 수 없습니다. 설명 : HTTP 404입니다. (또는 해당 종속성 중 하나)이 일 수 있고, 이름이 이거나, 임시로 을 사용할 수 없게 될 수 있습니다. URL에있는 을 검토하고 철자가 올바른지 확인하십시오.
요청 된 URL : 나는 응용 프로그램의 내부 폴더부터 DynamicData와 DD를 대체하려고했습니다 /DD/Work_Phases/ListDetails.aspx
이 DynamicData이며, 그 동일한 결과를 얻었다.
어떤 경로를 찾으려고합니까? –
@Adrian : DD/Work_Phase/ListDetails.aspx에 접근하려하지만 페이지가 올라 오지 않습니다. – RSolberg