c# - azure webapp 部署后获取站点正在构建消息

标签 c# azure visual-studio-2012 web-deployment azure-web-app-service

我在将我的 web 应用程序发布(使用 Visual Studio webdeploy )到 azure 时遇到网络故障。后来我再次尝试,然后我收到以下错误消息。

Error 5 Web deployment task failed. (Web Deploy cannot modify the file 'NewRelic.Agent.Core.dll' on the destination because it is locked by an external process. In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the AppOffline rule handler for .Net applications on your next publish attempt. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.) 0 0 ABCD.ABCD.ABCD.ABCD

所以我重新启动了我的网络应用程序几次,但同样的异常。然后我尝试使用FTP。那也是一次失败。几分钟后,我再次尝试使用 Visual Studio Web 部署,然后发布成功。但现在我收到 503 错误 - 站点正在 build 中。有什么想法吗?

注意:我也尝试过离线应用程序。没有希望

最佳答案

我解决了我的问题。解决方案是从根目录(在服务器上)中删除由于我添加到发布配置文件的应用程序离线规则而创建的离线 html (APP_OFFLINE.html)。

实际问题: <EnableMSDeployAppOffline>true</EnableMSDeployAppOffline>在您的发布配置文件中,该配置文件实际上用于在部署时使您的应用程序脱机。完成部署后,MSDeploy 工具应自动删除 APP_OFFLINE.html。但是,不知何故,上面的情况并没有发生。

所以我的建议是,查看一下您网站的根目录,如果有一个名为 APP_OFFLINE.html 的文件,请将其删除。

关于c# - azure webapp 部署后获取站点正在构建消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33045217/

相关文章:

c# - c#中的对象数组消耗多少内存?

Azure 辅助角色与 .Net 4.5.2 的兼容性

node.js - 如何设置 Azure 服务总线超时

visual-studio-2012 - 为什么我的 SqlPackage DeployReport 返回空报告?

c# - 将编码为 UTF-8 的 xml 文件转换为 ANSI

c# - 在 Unity 中,在播放模式期间更改编辑器的颜色

c# - 如何在我的 NopCommerce 网站主页中使用垂直 slider ?

Azure Web Api 401 - 未经授权 : Access is denied due to invalid credentials

c++ - Visual Studio 2012 "Smart"缩进自定义

c# - 在 Visual Studio 扩展中更改 "Color theme"