mvc4错误外部组件在编译时抛出异常

时间:2015-02-13 16:50:01

标签: asp.net-mvc-4 compiler-errors

我的生产网站上出现了一个恼人的错误,类型为System.Web.HttpCompileException。它的工作方式是这样的,我对控制器进行了更改,然后编译生产网站,以便更改生效。然而,当我在网站上导航时,有时会随机出现一个System.Web.HttpCompileException弹出,这通常会在编译后长达48小时发生,然后它会清除,我认为这是不正常的。可能导致此错误的原因是什么?哦,如果网页有局部视图,它会更频繁地出现。这是我发现错误详细信息的一些其他信息..任何建议都会很棒。哦,这和

一样

System.Web.HttpCompileException (0x80004005)

System.Web.HttpCompileException:外部组件 抛出异常。

 System.Web.HttpCompileException (0x80004005): External component has  thrown an exception.
  at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)
  at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode, Boolean ensureIsUpToDate)
 at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath, Boolean ensureIsUpToDate)
 at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
 at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
 at System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath)
  at System.Web.Compilation.BuildManager.GetCompiledType(String virtualPath)
   at System.Web.Mvc.BuildManagerWrapper.System.Web.Mvc.IBuildManager.GetCompiledType(String virtualPath)
   at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
  at System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName, ViewDataDictionary viewData, Object model, TextWriter writer, ViewEngineCollection viewEngineCollection)
  at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)
  at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName)
  at ASP._Page_Views_account_panel_cshtml.Execute() in e:\hostingspaces\myines\example.com\wwwroot\Views\Account\panel.cshtml:line 43
  at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
  at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
  at System.Web.WebPages.StartPage.RunPage()
  at System.Web.WebPages.StartPage.ExecutePageHierarchy()
  at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
  at System.Web.Mvc.RazorView.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.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
  at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
  at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
  at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass1e.<>c__DisplayClass28.<BeginInvokeAction>b__19()
  at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass1e.<BeginInvokeAction>b__1b(IAsyncResult asyncResult)

2 个答案:

答案 0 :(得分:0)

解决方案是清理Asp.Net临时文件或回收IIS池。

答案 1 :(得分:-1)

重启计算机就可以了!