[英]Visual Studio Team Services Azure deployment (Unable to perform the operation (“Delete File”) for the specified directory)
Heys guys, 大家好
I'm trying to deploy my NodeJS web app from Visual Studio Team Services to Azure using the build steps: 我正在尝试使用构建步骤将NodeJS Web应用程序从Visual Studio Team Services部署到Azure。
Everything works fine when I stopped the app in Azure manually before deploying. 在部署之前手动在Azure中停止应用程序时,一切正常。 But when I deploy while the app is running I get the following error on the last build step (3):
但是,当我在应用程序运行时进行部署时,在最后的构建步骤(3)上出现以下错误:
Unable to perform the operation ("Delete File") for the specified directory ("D:\home\site\wwwroot\logs\error.log"). This can occur if the server administrator has not authorized this operation for the user credentials you are using. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER.
I doubt the build process has insufficient rights, but think the log file to override is still in use by the running web app. 我怀疑构建过程的权限不足,但是正在运行的Web应用程序仍在使用要覆盖的日志文件。
I did not include the logs folder in my repository. 我没有在存储库中包含日志文件夹。
Anyone experienced this issue and can give some hints (might be automatically stopping and starting the services or prevent the build process from touching the file generally because it is not really necessary)? 任何人都遇到此问题并可以给出一些提示(可能因为没有必要,可能会自动停止和启动服务,或者通常阻止构建过程接触文件)?
For everybody stumbling across: 对于每个绊倒的人:
The solution was to stop the services before the Azure Web App Deployment with a Powershell script and to start them afterwards. 解决方案是使用Powershell脚本在Azure Web App部署之前停止服务,然后再启动它们。
param(
[string] [Parameter(Mandatory = $true)]
$Name,
[string] [Parameter(Mandatory = $true)]
$Slot
)
Start-AzureWebsite -Name $Name -Slot $Slot
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.