What's the cause of Error executing child request for handler?
I cannot reproduce this error because it rarely happened when I open same URL. Or you have any idea to show exact error that is the cause of this problem.
Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerWrapper'.
at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage)
at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm)
at System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm)
at System.Web.Mvc.ViewPage.RenderView(ViewContext viewContext)
at System.Web.Mvc.WebFormView.RenderViewPage(ViewContext context, ViewPage page)
at System.Web.Mvc.WebFormView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b()
at System.Web.Mvc.ControllerActionInvoker.In开发者_Go百科vokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
PS. I have ever got this problem. But my old bug constantly show error like this that cause by syntax error in ViewPage and another error cause by error in extension method.
Well there's no way from the information in your question for us to say exactly what the error is as it looks to me like this stack trace you've given here is actually only the outermost exception. We'd need to see the inner exception hierarchy to be able to diagnose better.
But...
This is going to be an error whilst running through the Asp.Net code in whatever view is rendering. It could be bad server-side code (compiler error) or a run time error such as NullReferenceException
occurring directly in the code of the page, or in a component that the page calls (such as, as you say, HtmlHelper
).
In theory you should be seeing an Asp.Net error page showing which line in the aspx is causing the problem.
I would attach the debugger and ensure that the 'Thrown' column is ticked in the Debug->Exceptions dialog. Then hit the same page again and you should see the exact place where the error happens.
I appreciate that the problem occurs only once in a while - therefore I'd be looking at code within that page (And indeed the controller that serves its View Model) where the data is dependent on some variable (current user, time of day even) and then see if it could be null or whatever.
精彩评论