繁体   English   中英

Visual Studio Team Services Azure部署(无法对指定目录执行操作(“删除文件”))

[英]Visual Studio Team Services Azure deployment (Unable to perform the operation (“Delete File”) for the specified directory)

大家好

我正在尝试使用构建步骤将NodeJS Web应用程序从Visual Studio Team Services部署到Azure。

  1. npm
  2. 古尔普
  3. Azure Web App部署

在部署之前手动在Azure中停止应用程序时,一切正常。 但是,当我在应用程序运行时进行部署时,在最后的构建步骤(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.

我怀疑构建过程的权限不足,但是正在运行的Web应用程序仍在使用要覆盖的日志文件。

我没有在存储库中包含日志文件夹。

任何人都遇到此问题并可以给出一些提示(可能因为没有必要,可能会自动停止和启动服务,或者通常阻止构建过程接触文件)?

对于每个绊倒的人:

解决方案是使用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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM