2015-01-12 47 views
0

我主辦網站(一個WebForm應用),但加載登錄頁面顯示此錯誤: http://blog.milstein.me託管基於路由的Web應用程序

External component has thrown an exception. System.Web.HttpCompileException (0x80004005): External component has thrown an exception. at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.b__1(AssemblyBuilder assemblyBuilder) at System.Threading.Tasks.Parallel.<>c__DisplayClass32`2.b__30() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass11.b__10(Object param0) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) at System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) at System.Web.Compilation.BuildManager.EnsureFirstTimeDirectoryInit(VirtualPath virtualDir) 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.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at SageFrame.Framework.PageBase.LoadControl(String UpdatePanelIDPrefix, Boolean IsPartialRendring, PlaceHolder ContainerControl, String ControlSrc, String PaneName, String strUserModuleID, String suffixClass, String HeaderText, Boolean IsUserAdmin, HtmlGenericControl divControl, HtmlGenericControl paneControl, Boolean IsEdit)

然而,主頁和其他路由頁面加載完美! 這個問題的主要原因是什麼?如何解決它?託管的.NET版本是.NET 4.0。

+0

它現在似乎正常工作? –

+0

@RobTillie你能解釋一下錯誤日誌實際上是什麼意思嗎? – Milson

+1

它無法編譯它試圖加載的東西,從它的外觀上看,它是頁面上的模板控件。如果它在本地工作正常,可能是由於部署中缺少某些引用或IIS中的錯誤.net配置。但是你現在是否正確加載,你解決了嗎? –

回答

0

這通常是由於託管應用程序池緩存機制。在Hosting c-panel中,每個託管網站都有App Pool清除選項。清除緩存後,它會正確加載所有新引用的dll。