发布Azure Webapp-编译错误

发布Azure Webapp-编译错误,azure,azure-web-app-service,Azure,Azure Web App Service,我将我的网站发布到Azure作为一个WebApp。如果在浏览器中调用url,则会出现以下异常: Compiler Error Message: The compiler failed with error code -532462766. Details >> D:\Windows\system32>D:\home\site\wwwroot\bin\roslyn\csc.exe .. Eventviewer提供了更多详细信息: Event code: 3007 Event

我将我的网站发布到Azure作为一个WebApp。如果在浏览器中调用url,则会出现以下异常:

Compiler Error Message: The compiler failed with error code -532462766.

Details >> D:\Windows\system32>D:\home\site\wwwroot\bin\roslyn\csc.exe ..
Eventviewer提供了更多详细信息:

Event code: 3007
Event message: A compilation error has occurred.
Event time: 3/8/2016 1:35:14 PM
Event time (UTC): 3/8/2016 1:35:14 PM
Event ID: 477178e2e625406e9be094df085f6bc9
Event sequence: 3
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/540489099/ROOT-1-131019177071229326
Trust level: Full
Application Virtual Path: /
Application Path: D:\home\site\wwwroot\
Machine name: RD000D3AB25B42

Process information:
Process ID: 14752
Process name: w3wp.exe
Account name: IIS APPPOOL\mySite

Exception information:
Exception type: HttpCompileException
Exception message: External component has thrown an exception. at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) at System.Web.Compilation.BuildManager.CompileGlobalAsax() at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() at System.Web.Compilation.BuildManager.CallAppInitializeMethod() at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)


Request information:
Request URL: http://mySite.azurewebsites.net/
Request path: /
User host address: ...
User: 
Is authenticated: False
Authentication Type: 
Thread account name: IIS APPPOOL\mySite

Thread information:
Thread ID: 9
Thread account name: IIS APPPOOL\mySite
Is impersonating: False
Stack trace: at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) at System.Web.Compilation.BuildManager.CompileGlobalAsax() at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() at System.Web.Compilation.BuildManager.CallAppInitializeMethod() at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

Custom event details:
我试着
  • 重新生成项目并重新发布
  • 通过azure门户重新启动站点
  • 放大和缩小站点以确保真正的“新鲜”状态

如何解决此问题?

在“设置”>“文件发布选项”中选择“在目标位置删除其他文件”。因为一些旧的DLL可以阻止应用程序启动(版本控制问题等)。

我遇到了这个问题,我设法解决了它。首先,使用FTP客户端打开网站根目录并删除所有文件。接下来,在文件系统上发布您的项目,然后使用FTP客户端将其复制回网站根目录。

在目标位置删除其他文件是选中此选项还是在部署前删除文件?如果你不喜欢,试试看。如果它不起作用,请尝试在上终止进程。在目标位置删除其他文件可修复此问题!谢谢!请随意将此作为答案发布。我已经检查了此设置。今天,我的服务器出现了同样的错误,是否可以用其他方法防止这种情况?两次重新启动后,它会再次工作。。