question

Chamandi-1431 avatar image
0 Votes"
Chamandi-1431 asked ryanchill commented

Deployment failed from bitbucket to Azure Web App

Right now whenever something is merged to master branch in bitbucket it triggers a build in azure. It was working fine until I was the only one checking in code. When my teammate is checking in the code the deploy is failing on Azure.
Getting this error:

Command: "D:\home\site\deployments\tools\deploy.cmd" Handling ASP.NET Core Web Application deployment with MSBuild16.7.0. Access is denied. Failed exitCode=1, command="D:\Program Files (x86)\MSBuilds\16.8.3\MSBuild\Current\Bin\MSBuild.exe" /restore "D:\home\site\repository\Demo.Test\Demo.Test.csproj" /p:DeployOnBuild=true /p:configuration=Release /p:publishurl="D:\local\Temp\8xddxxxxx" An error has occurred during web site deployment. Access is denied.\r\nD:\Program Files (x86)\SiteExtensions\Kudu\94.30524.5227\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

How to fix this issue?
@ryanchill

azure-webapps-content-deployment
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ryanchill avatar image
0 Votes"
ryanchill answered ryanchill commented

Hi @Chamandi-1431,

At first glance, this sounds like a file lock issue to me. Try checking for processes in the Kudu console that could possibly have the file locked or stop the site and redeploy and see if that works. If it doesn't, comment with what you're seeing down below.

· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

When I try to access MSBuilds folder under programs files (x86) in Kudu I am getting Access Denied, that is the reason I am getting the build failure since it is not able to access that folder for some reason. I did try stopping and starting the web app again but same result.

0 Votes 0 ·

Sorry for the confusion @Chamandi-1431. What I meant was does the deployment still fail while your app service is stopped?

0 Votes 0 ·

Deployment still fails when app is turned off. In Kudu cmd I am getting access denied on " D:\Program Files (x86)\MSBuilds\".

0 Votes 0 ·
Show more comments