title: How can I use this stack trace to tell what is causing my controller's action to break?
body: <p>In my ASP.NET MVC app, I have a view that's calling <code>Html.Action("MyAction", this.Model)</code> - I have a similar scenario in a different controller and it works fine, but in this case, it breaks. I set a breakpoint on the first line of <code>MyAction</code>, but it's not breaking, so the error must occur before that point in the code. </p>
  
  <pre><code>System.Web.HttpException: Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerWrapper'. ---&amp;gt; System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---&amp;gt; System.Web.HttpException: Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'. ---&amp;gt; System.Web.HttpException: Server cannot set status after HTTP headers have been sent.
     at System.Web.HttpResponse.set_StatusCode(Int32 value)
     at System.Web.HttpResponseWrapper.set_StatusCode(Int32 value)
     at Cobalt.Website.Platform.Web.Controllers.Controller.OnException(ExceptionContext filterContext) in D:\data\Website\App\Website\Controllers\Controller.cs:line 920
     at System.Web.Mvc.Controller.System.Web.Mvc.IExceptionFilter.OnException(ExceptionContext filterContext)
     at System.Web.Mvc.ControllerActionInvoker.InvokeExceptionFilters(ControllerContext controllerContext, IList`1 filters, Exception exception)
     at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
     at System.Web.Mvc.Controller.ExecuteCore()
     at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
     at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)
     at System.Web.Mvc.MvcHandler.&amp;lt;&amp;gt;c__DisplayClass8.&amp;lt;BeginProcessRequest&amp;gt;b__4()
     at System.Web.Mvc.Async.AsyncResultWrapper.&amp;lt;&amp;gt;c__DisplayClass1.&amp;lt;MakeVoidDelegate&amp;gt;b__0()
     at System.Web.Mvc.Async.AsyncResultWrapper.&amp;lt;&amp;gt;c__DisplayClass8`1.&amp;lt;BeginSynchronous&amp;gt;b__7(IAsyncResult _)
     at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
     at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
     at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
     at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerAsyncWrapper.&amp;lt;&amp;gt;c__DisplayClassa.&amp;lt;EndProcessRequest&amp;gt;b__9()
     at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.&amp;lt;&amp;gt;c__DisplayClass4.&amp;lt;Wrap&amp;gt;b__3()
     at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap[TResult](Func`1 func)
     at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap(Action action)
     at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerAsyncWrapper.EndProcessRequest(IAsyncResult result)
     at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
     --- End of inner exception stack trace ---
     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.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter)
     at System.Web.Mvc.Html.ChildActionExtensions.Action(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues)
     at System.Web.Mvc.Html.ChildActionExtensions.Action(HtmlHelper htmlHelper, String actionName, Object routeValues)
     at ASP.search_views_searchresults_aspx.__RenderContent7(HtmlTextWriter __w, Control parameterContainer) in d:\data\Website\App\Website\Search\Views\SearchResults.aspx:line 39
     at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
     at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
     at System.Web.UI.Control.Render(HtmlTextWriter writer)
     at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
     at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
     at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
     at ASP.views_shared_masters_cobaltpage_master.__Rendercoid_website_pageContent(HtmlTextWriter __w, Control parameterContainer) in d:\data\Website\App\Website\Views\Shared\Masters\CobaltPage.master:line 50
     at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
     at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
     at System.Web.UI.Control.Render(HtmlTextWriter writer)
     at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
     at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
     at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
     at ASP.views_shared_masters_cobaltstatic_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in d:\data\Website\App\Website\Views\Shared\Masters\CobaltStatic.master:line 78
     at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
     at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
     at System.Web.UI.Control.Render(HtmlTextWriter writer)
     at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
     at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
     at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
     at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
     at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
     at System.Web.UI.Control.Render(HtmlTextWriter writer)
     at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
     at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
     at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
     at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
     at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
     at System.Web.UI.Page.Render(HtmlTextWriter writer)
     at System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer)
     at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
     at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
     at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     --- End of inner exception stack trace ---
     at System.Web.UI.Page.HandleError(Exception e)
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     at System.Web.UI.Page.ProcessRequest()
     at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
     at System.Web.UI.Page.ProcessRequest(HttpContext context)
     at System.Web.Mvc.ViewPage.ProcessRequest(HttpContext context)
     at ASP.search_views_searchresults_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\4bd59adb\8512bc8c\App_Web_creqrbqh.4.cs:line 0
     at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.&amp;lt;&amp;gt;c__DisplayClass1.&amp;lt;ProcessRequest&amp;gt;b__0()
     at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.&amp;lt;&amp;gt;c__DisplayClass4.&amp;lt;Wrap&amp;gt;b__3()
     at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap[TResult](Func`1 func)
     at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap(Action action)
     at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.ProcessRequest(HttpContext context)
     at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
     --- End of inner exception stack trace ---
     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.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.&amp;lt;&amp;gt;c__DisplayClass14.&amp;lt;InvokeActionResultWithFilters&amp;gt;b__11()
     at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
     at System.Web.Mvc.ControllerActionInvoker.&amp;lt;&amp;gt;c__DisplayClass14.&amp;lt;&amp;gt;c__DisplayClass16.&amp;lt;InvokeActionResultWithFilters&amp;gt;b__13()
     at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
     at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)--&gt; &lt;/div&gt;
  </code></pre>
  
  <p>How can I get from this stack trace to figuring out the code in my application that causes the exception? </p>