2010-06-11 3 views
0

로컬 컴퓨터의 서버 (Windows Server 2003)에서 iis 6에 asp.net mvc 응용 프로그램을 게시했습니다. 서버에서 나는 default.aspx로 기본 페이지를 설정했다. 하지만 서버에서 사이트를 탐색하려고하면 예외가 발생합니다. "들어오는 요청이 어떤 경로와도 일치하지 않습니다." 내가 알아챈 한 가지는 그 점입니다. 5 행의 스택 추적은 아래와 같습니다. 그것은 그 예외가 여전히 내 로컬 컴퓨터 경로이상한 스택 추적 예외 "들어오는 요청이 어떤 경로와도 일치하지 않습니다."

[HttpException (0x80004005): The incoming request does not match any route.] 
    System.Web.Routing.UrlRoutingHandler.ProcessRequest(HttpContextBase httpContext) +15589 
    System.Web.Routing.UrlRoutingHandler.ProcessRequest(HttpContext httpContext) +40 
    System.Web.Routing.UrlRoutingHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +7 
    **UserManagement._Default.Page_Load(Object sender, EventArgs e) in D:\Evoletpublishnew\UserManagement\UserManagement\Default.aspx.cs:18** 
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 
    System.Web.UI.Control.OnLoad(EventArgs e) +99 
    System.Web.UI.Control.LoadRecursive() +50 
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 
+0

2 가지. 어떤 경로를 설정했으며 어떤 경로에 액세스하려고합니까? –

+0

내 maprroute를 보여준 아래의 코멘트를 참조하십시오. 위의 예외는 http : \\ localhost : 8800 서버에 액세스하려고 할 때 발생합니다. 내가 http : \\ localhost : 8800 \ account.mvc에 접근하면 괜찮습니다. – Tassadaque

답변

0

해결했습니다. 다음과 같이 global.asax 등록 경로를 변경했습니다.

routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 
routes.MapRoute("Default", "{controller}.mvc/{action}/{id}", 
     new { action = "Index", id = "" } 
    ); 
routes.MapRoute("Root", "", 
     new { controller = "Account", action = "Index", id = "" } 
    ); 
0

당신은 아마 누락 일부 컨트롤러와 액션에 매핑 할 필요성을 무시하지 않는 모든 요청을 가리키는 하나 이상한 것은이있다. 일반적으로 기본 경로는 다음과 같습니다과 경로 테이블의 마지막 항목 다음과 같습니다

routes.MapRoute("Default", "{controller}/{action}/{id}", 
    new { controller = "Home", action = "Index", id = "" } 
); 

로컬 컴퓨터로보고있는 참조는 어셈블리가 컴파일되는 파일의 바로 위치입니다.

+0

나는 그것이 이미 있다고 생각합니다. 내 레지스터 좀 봐주세요 public static void RegisterRoutes (RouteCollection routes) { routes.IgnoreRoute ("{리소스} .axd/{* pathInfo}"); routes.MapRoute ( "기본값", // 경로 이름 "{컨트롤러} .mvc/{작업}/{id}", // 매개 변수가있는 URL new {controller = "account", action = "Index ", id =" "} // 매개 변수 기본값 ); – Tassadaque

+0

Default.aspx에는 무엇이 들어 있습니까? – dahlbyk

+0

asp.net mvc가 생성됨에 따라 기본값이 변경되지 않았습니다. – Tassadaque

관련 문제