当前位置: 首页 > 知识库问答 >
问题:

发布后未加载网站

隆飞宇
2023-03-14

我有一个网站,我已经使用了很长时间,没有任何问题。我做了一些改进来提高性能,包括将数据存储在缓存中,以及改变网站与数据库的交互方式。然而,自从将网站发布到它的位置后,现在每当我试图加载它时,它都返回一个空白页。

每当我尝试加载它时,我都会收到来自该站点的错误电子邮件,显示“外部组件已引发异常”的异常消息。我有几个地方可以发送错误电子邮件,它们都在触发,每个地方提供的堆栈跟踪略有不同,如下所示。

堆栈跟踪1

at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) atSystem.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(VirtualPathvirtualPath) at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.Async.AsyncControllerActionInvoker.

堆栈跟踪 2

位于System.Web.Complation.BuildManager。System.Web.Complation.BuildManager上的PostProcessFoundBuildResult(BuildResults结果,Boolean keyFromVPP,VirtualPath VirtualPath)。GetBuildResultFromCacheInternal(String cacheKey,Boolean keyFromVPP,VirtualPath VirtualPath,Int64 hashCode,Boolean-ensureIsUpToDate)位于System.Web.Complation.BuildManager。System.Web.Complation.BuildManager上的GetVPathBuildResultFromCacheInternal(VirtualPath VirtualPath,Boolean ensureIsUpToDate)。System.Web.Complation.BuildManager上的GetVPathBuildResultInternal(虚拟路径虚拟路径、布尔noBuild、布尔allowCrossApp、布尔allow构建预编译、布尔throwIfNotFound、布尔ensureIsUpToDate)。System.Web.Complation.BuildManager上的GetVPathBuildResultWithNoAssert(HttpContext上下文、VirtualPath虚拟路径、布尔noBuild、布尔allowCrossApp、布尔allwBuildInPrecompile、布尔throwIfNotFound、布尔ensureIsUpToDate)。GetVirtualPathObjectFactory(VirtualPath VirtualPath,HttpContext上下文,布尔allowCrossApp,布尔throwIfNotFound)位于System.Web.Complation.BuildManager。System.Web.Mvc.BuildManagerCompiledView上的GetCompiledType(VirtualPath VirtualPath)。在System.Web.Mvc.ViewResultBase中渲染(ViewContext ViewContext,TextWriter编写器)。System.Web.Mvc.ControllerActionInvoker处的ExecuteResult(ControllerContext上下文)。System.Web.Mvc.Controller处的InvokeAction(ControllerContext controllerContact,String actionName)。System.Web.Mvc.ControllerBase上的ExecuteCore()。在ITJobs.MvcApplication上执行(RequestContext RequestContext)。C:\projects\Norton VS2015 Modules\ITJobs\ITJobs \Global.asax中的Application_Error(对象发送方,EventArgs e)。cs:第53行

有人能告诉我为什么这可能突然开始失败吗?当我通过Visual Studio在本地加载它时,它可以正常工作,并且只有在从远程服务器加载时才会遇到问题。

编辑

此后,我尝试重新部署站点,它现在正在加载一些东西,但我收到了一个服务器错误:

Compilation Error 

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: The compiler failed with error code 255.

我现在也得到了不同的堆栈跟踪:

C:\Windows\System32\inetsrv

共有1个答案

邵骏喆
2023-03-14

所以事实证明,问题是解决方案中包含的Roslyn包。从bin文件夹中删除文件夹,从解决方案中删除包,并重新部署修复了问题。

感谢所有评论的人!

 类似资料:
  • 我创建了一个Web项目,它在Visual Studio中运行良好。但是,我在将其发布到Azure网站后收到了以下错误。是什么导致了这个问题? 未能加载文件或程序集系统。Web.Http.WebHost,Version=5.0.0.0,Culture=neutral,public key token = 31bf 3856 ad 364 e 35 '或其依赖项之一。找到的程序集的清单定义与程序集引用

  • 发布网站 你现在应该有一个在本地运行的网站。 一旦你将它定制为你喜欢样子,就是时候发布它了。 Docusaurus 生成一个静态 HTML 网站,准备好由您最喜爱的网络服务器或在线托管解决方案来提供服务。 构建静态 HTML 页面 要创建您的网站的静态版本,请在 website 的目录中运行以下脚本: yarn run build # 或 `npm run build` 这将在 website

  • 问题内容: 我在加载时遇到问题 在同一个文件夹中。 我在dist文件夹中有一个myProject.jar,在conf文件夹中有test.xml和test.properties。 要加载xml,我正在使用 但是我在加载属性文件时遇到问题 属性文件没有任何作用。 任何帮助表示赞赏。 问题答案: 为什么不取出文件并使用 上面的代码将获取属性文件并将其加载到属性对象中。

  • 这是我的密码: 并与, 仍然给出了这个问题: 错误。/src/客户端/资产/字体/黑色。TTF 1:0模块解析失败:意外字符”(1:0)您可能需要一个适当的加载程序来处理此文件类型,目前没有配置加载程序来处理此文件。请参见https://webpack.js.org/concepts#loaders(此二进制文件省略了源代码)@./src/Client/page/Home/Homepage.mod

  • 问题内容: 我正在尝试进行变量替换,同时也使它可以通过ngClick单击。 我做了一个小矮人演示(单击按钮,观察输入框保持不变) 标记: 角度的东西: 问题是:为什么单击按钮时不触发。应该在输入字段中设置值’foobar’。 问题答案: 同时,有一个针对该问题的官方解决方案: 无需编写自定义指令即可进行编译。 有关更多信息:https : //github.com/angular-translat