2009-10-15 36 views
1

如果我離開了一段時間的ASP.NET MVC應用程序然後嘗試訪問任何頁面,或者如果我重新編譯應用程序並嘗試訪問任何根頁我得到的Error executing child request for handler錯誤其次是頁面路徑,如'ASP.areas_accounts_views_contractscontrol_createdatacontract_aspx'.任何想法爲什麼這可能會發生?它只是在重新編譯之後發生的,這意味着如果它已經啓動,每個人都會在嘗試訪問任何頁面時看到這個錯誤,但是在主頁上。可能超時問題

乾杯

這裏的堆棧跟蹤:

[HttpException (0x80004005): Error executing child request for handler 'ASP.areas_accounts_views_contractscontrol_generalcontracts_aspx'.] 
    System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +2677782 
    System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) +77 
    System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +28 
    System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +22 
    System.Web.Mvc.ViewPage.RenderView(ViewContext viewContext) +180 
    System.Web.Mvc.WebFormView.RenderViewPage(ViewContext context, ViewPage page, TextWriter textWriter) +96 
    System.Web.Mvc.WebFormView.Render(ViewContext viewContext, TextWriter writer) +95 
    System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +278 
    System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +10 
    System.Web.Mvc.<>c__DisplayClass11.<InvokeActionResultWithFilters>b__e() +20 
    System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +251 
    System.Web.Mvc.<>c__DisplayClass13.<InvokeActionResultWithFilters>b__10() +19 
    System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +178 
    System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +392 
    System.Web.Mvc.Controller.ExecuteCore() +126 
    System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +39 
    System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +7 
    System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +151 
    System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +57 
    System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +7 
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75 

源錯誤:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

HttpHandlers的我的web.config的部分

<httpHandlers> 
    <remove verb="*" path="*.asmx"/> 
    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
    <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/> 
    <add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
    <add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory" /> 
</httpHandlers> 

提交的bug to MvcSiteMap on CodePlex

+0

你能發佈web.config的部分嗎? – UpTheCreek 2009-10-20 07:10:09

+0

我修改了我原來的帖子。 – Kezzer 2009-10-20 07:47:18

+0

似乎會議問題。 – 2009-10-21 07:37:16

回答

0

我不認爲這是重新編譯是問題。

它在IIS中的應用程序閒置了一段時間,或者如果有應用程序池的回收,則在內存中緩存的信息將丟失。

下一次調用將觸發JIT重新編譯。

什麼也丟失了任何緩存在內存中的數據,以及可能已經創建的任何singelton對象。

我的猜測是,你正在創建或初始化的東西,當調用根頁面。所有其他頁面都依賴於此初始化已完成。這就是爲什麼其他頁面在根頁面之前被調用的原因。

+0

是的,事實證明,它實際上是一個MvcSiteMap中的錯誤,因爲我在調試模式下進行了測試。它有一個超時標誌,所以它重新呈現菜單,但是當它去抓取當前的SiteMapNode時,由於第三方庫而失敗。我將它作爲我在編輯中發佈的錯誤提交。 – Kezzer 2009-10-26 09:02:12