发布后网站未加载

时间:2017-03-23 17:10:17

标签: c# asp.net .net asp.net-mvc asp.net-mvc-4

我有一个网站,我已经使用了很长一段时间没有任何问题。我做了一些改进以提高性能,包括将数据存储在缓存中以及改变站点与数据库的交互方式。但是,由于将网站发布到它的位置,现在只要我尝试加载它就会返回一个空白页。

每当我尝试加载时,我都会收到来自网站的错误电子邮件,显示异常消息"外部组件引发异常"。我有几个地方可以发送错误电子邮件,并且它们都在触发,每个都提供了稍微不同的堆栈跟踪,这些都在下面。

Stack Trace 1

  

System.Web.Compilation上的System.Web.Compilation.AssemblyBuilder.Compile()位于System.Web.Compilation.BuildManager.Compile上的System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath虚拟路径)的System.Web.Compilation.BuildProvidersCompiler.PerformBuild()。 GetVPathBuildResultInternal(virtualPath virtualPath,布尔noBuild,布尔allowCrossApp,布尔allowBuildInPrecompile,布尔throwIfNotFound,布尔ensureIsUpToDate)在System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext的上下文中,virtualPath virtualPath,布尔noBuild,布尔allowCrossApp,布尔allowBuildInPrecompile,布尔throwIfNotFound,布尔在System.Web.Compilation.Mvc.BuildManagerCompiledView.Render上的System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath)处的System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath,HttpContext context,Boolean allowCrossApp,Boolean throwIfNotFound)处确保了(更新)。 System.We上的ViewContext viewContext,TextWriter writer) System.Web.Mvc.Controller.b__1d(IAsyncResult asyncResult,ExecuteCoreState innerState)上的System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c__DisplayClass21.b__1e(IAsyncResult asyncResult)中的b.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) System.Web.Mvc.Async上的System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid 1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid 1.CallEndDelegate(IAsyncResult asyncResult)位于System.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult,ProcessRequestState innerState)。 System.Web.HttpApplication.ExecuteStep上的System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()中的AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)(IExecutionStep step,Boolean& completedSynchronously)

Stack Trace 2

  

在   System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult   结果,布尔值keyFromVPP,VirtualPath virtualPath)at   System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(字符串   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   保证在最近的时候   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.Mvc.BuildManagerCompiledView.Render(ViewContext   viewContext,TextWriter writer)at   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)   在   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext   controllerContext,String actionName)at   System.Web.Mvc.Controller.ExecuteCore()at   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)   at ITJobs.MvcApplication.Application_Error(Object sender,EventArgs e)   在C:\ projects \ Norton VS2015 Modules \ ITJobs \ ITJobs \ Global.asax.cs:line   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> D:\ inetpub \ devnortonitjobs \ bin \ roslyn \ csc.exe / t:library / utf8output / nostdlib + / R:" C:\ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ mscorlib.dll中" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ assembly \ dl3 \ 7dde560d \ a27d7599_f3a3​​d201 \ ITJobs.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ assembly \ dl3 \ 8180ca72 \ 00c8d184_3aaece01 \ Antlr3.Runtime.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Deployment\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.Deployment.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Web.Infrastructure\v4.0_1.0.0.0__31bf3856ad364e35\Microsoft.Web.Infrastructure.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ assembly \ dl3 \ 01bc4244 \ 00f33ccc_5616d101 \ EntityFramework.SqlServer.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ assembly \ dl3 \ f960caeb \ 001bc110_4318cf01 \ WebGrease.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ assembly \ dl3 \ 66b265c1 \ 00f33ccc_5616d101 \ EntityFramework.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll" /R:"C:\Windows\assembly\GAC_MSIL\Microsoft.Web.Administration\7.0.0.0__31bf3856ad364e35\Microsoft.Web.Administration.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ assembly \ dl3 \ 976e3ce5 \ 00196fd3_a63ad001 \ System.Web.Mvc.dll&# 34; /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ assembly \ dl3 \ dc05fc19 \ 00b31c22_a73ad001 \ System.Web.WebPages.Deployment。 DLL" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ assembly \ dl3 \ df4b3ddd \ 00b31c22_a73ad001 \ System.Web.Helpers.dll&# 34; /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ assembly \ dl3 \ d23b6113 \ 00b31c22_a73ad001 \ System.Web.WebPages.Razor。 DLL" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ assembly \ dl3 \ 07b76d4f \ 00b31c22_a73ad001 \ System.Web.WebPages.dll&# 34; /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ assembly \ dl3 \ c3ba886d \ 0044d876_ee54d201 \ Microsoft.CodeDom.Providers.DotNetCompilerPlatform。 DLL" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ assembly \ dl3 \ 7f7593fb \ 0054c7db_a63ad001 \ System.Web.Razor.dll&# 34; /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ assembly \ dl3 \ dfebe864 \ 000f0ccd_bfc5d101 \ Newtonsoft.Json.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ assembly \ dl3 \ 6a6fa841 \ 00a6d731_3527cf01 \ System.Web.Optimization.dll&# 34; /out:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ App_global.asax.fqgak1se.dll" / D:DEBUG / debug + / optimize- / warnaserror- / w:4 / nowarn:1659; 1699; 1701; 612; 618 / langversion:6 / nowarn:1659; 1699; 1701" C:\ Windows \ Microsoft .NET \ Framework64 \ v4.0.30319 \ Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ App_global.asax.fqgak1se.0.cs" " C:\ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ Temporary ASP.NET Files \ root \ 6b99920d \ 6bc21d2c \ App_global.asax.fqgak1se.1.cs"

1 个答案:

答案 0 :(得分:0)

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

感谢所有评论的人!