Web Deploy Failed - sync passes exceeded

1.2k Views Asked by At

I haven't found any good answers to this that have worked for me. I am trying to deploy BlogEngine.NET to Microsoft Azure from Visual Studio, and it worked fine up until yesterday. Now every time I try to deploy, I get this message:

Error Web deployment task failed. (The synchronization is being stopped because the maximum number of sync passes '2' has been exceeded even though all the changes could not be applied. This could occur if there are external changes being made to the destination.) BlogEngine.NET 0

The error does not get more specific than that - it doesn't tell me what exactly it failed to do. The application is also configured to use a database.

It will succeed once in a while, but fails ~ 95% of the time. I've also tried stopping the application in the Azure portal before deployment. I also read that increasing the number of sync passes is not recommended. In the past retrying the deployment has solved any issues related to that number.

Any additional suggestions would be appreciated!

-Jeff

2

There are 2 best solutions below

1
Rami Sarieddine On

One way to resolve this issue is to delete the files in the destination and re-run the web deploy.

Also, sometimes this issue seems to revolve around the ACL step of the web deploy, which attempts to change the permissions of your websites files as a safety measure intended to ensure they are not changed during a deployment.

By default Web Deploy sets the ACL of the sites anonymous user to read only while also overwriting Control Panel access to your website. Source

You can turn of ACL in future to avoid this if you wish. Also, one workaround if you are using the Web Deploy dirPath, filePath, or contentPath providers is to change the ignoreErrors provider setting. If you know that you are consistently hitting a certain error number, you can specify that that error be ignored when it's hit.

0
user704772 On

I realize this is a very old question, but we ran into this issue and were able to resolve it by restarting the app service and then redeploying.