托管基于路由的 Web 应用程序

Hosting a Routing based web application

我正在托管一个网站(一个网络表单应用程序)但加载登录页面时显示此错误: http://blog.milstein.me

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。

这通常是由于托管应用程序池缓存机制造成的。在托管控制面板中,每个托管网站都有应用程序池清除选项。清除缓存后,它会正确加载所有新引用的 dll。