使用中的Azure App Service Deploy文件 [英] Azure App Service Deploy file in use

查看:140
本文介绍了使用中的Azure App Service Deploy文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我们使用Azure App Service Deploy任务来部署我们的Web部署程序包.

In my project we use Azure App Service Deploy task to deploy our webdeploy packages.

我注意到有时即使部署了使应用程序脱机"选项,部署时也会出现文件使用错误.

I noticed that sometimes I get a file in use error while deploying, even when the option 'Take app offline' has been set on.

解决此问题的最佳方法是什么?

What is the best way to fix this ?

这是错误:

2016-12-07T15:26:44.8411101Z ##[error]Failed to deploy website.

2016-12-07T15:26:44.8411101Z ##[error]Error Code: ERROR_FILE_IN_USE

2016-12-07T15:26:44.8421096Z More Information: Web Deploy cannot modify the file 'Microsoft.CodeAnalysis.CSharp.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.

推荐答案

我有此页面建议的临时修复程序此处

I have a temporary fix as recommended in this page here

在部署之前,我已经使用此命令执行了Azure CLI任务:

I have made a Azure CLI task using this command before the deploy:

azure webapp stop --resource-group XX --name YY

(其中XX是资源组名称,YY是Web应用程序服务)

(where XX is the resource group name, YY the web app service)

然后使用Azure Web部署任务执行部署

Then performing the deploy using Azure Web Deploy Task

然后在部署后执行此Azure CLI任务:

Then performing this Azure CLI task after the deploy:

azure webapp start --resource-group XX --name YY

那行得通.

这篇关于使用中的Azure App Service Deploy文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆