简体   繁体   English

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

[英]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。

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

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.

相关问题 Visual Studio Team Services上npm的升级节点 - Upgrade node for npm at Visual Studio Team Services Node.js Azure WebJob:如何通过持续交付从Visual Studio Team Services进行部署 - Node.js Azure WebJob: How to deploy from Visual Studio Team Services with Continuous Delivery 无法识别Visual Studio Team Services Build yml npm测试 - Visual Studio Team Services Build yml npm test not recognized 在Visual Studio Team Services Build中启动Mocha测试 - Kick off mocha tests in Visual Studio Team Services Build Visual Studio 在 azure 上的应用程序部署期间总是卡住 - Visual Studio get stuck always during app deployment on azure npm的Visual Studio Team Services FTP上传输出运行build:prod - Visual Studio Team Services FTP upload output of npm run build:prod 运行“节点测试”作为Visual Studio Team Services构建任务的一部分,并在“测试”选项卡中显示结果 - Run “node test” as part of Visual Studio Team Services build task with results in “tests” tab 我可以在Visual Studio Team Service上通过zip部署Azure Web应用程序吗? - Is it possible for me to deploy an azure web app by zip on Visual studio Team service? 如何将纯Angular应用程序从Visual Studio Team System部署到Azure网站 - How to deploy a pure Angular application from Visual Studio Team System to Azure websites Azure NodeJS Azure Devops 部署失败,但 Visual Studio 部署工作完美 - Azure NodeJS Azure Devops deployment failing but Visual Studio deploy works perfect
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM