Investigating issues using WebDeploy for Azure App Service

First published on MSDN on May 23, 2018

How can I investigate issues deploying to my site using WebDeploy\MSDeploy?

You can publish to your Web Site using Visual Studio\VSTS or  using WebDeploy directly.

In general both Visual Studio\VSTS are using WebDeploy behind the scenes.

You can review your VSTS Release step to see if it is using MSDeploy.


Here are the steps we recommend to investigate Web Deployment issues.

  • Check if this is a Deployment or Runtime issue by following these steps.

    If you determine that it is a deployment issue then you can check if the site deploys correctly by following the steps in

  • If there are errors connecting to the MSDeploy endpoint then there are two logfiles you can use to help investigate this.

  • If you are deploying from a zipped/compressed archive that WAS NOT created by MSDeploy, and you encounter the following error:

    “Message: AppGallery Deploy Failed: ‘System.IO.DirectoryNotFoundException: Could not find a part of the path ‘D:\home\site\wwwroot\(…)’.”

    It’s because MSDeploy was unable to process the archive. Zipped/compressed archives created using the PowerShell “Compress-Archive” cmdlet or the Microsoft.NET Framework API “System.IO.Compression.ZipArchive” which are known to be incompatible with MSDeploy.

    Instead, consider using the “-source:contentPath='<folder-path>'” MSDeploy parameter.

    There is more information at

  • For VSTS you can also run your releases in debug mode to get more information.

  • Customers sometimes see an issue where the connection to the MSDeploy endpoint can be reset and this may lead to an issue where the deployment fails.

    You may see an error like this – Sockets Error 100056.

    This issue can be related to network connectivity issues so it’s worth trying to isolate it but following these steps.

    1. Testing to see if you can deploy from another network location.

    2. Testing to see if you can deploy to the same Azure App Service using a test VM in the cloud.

    3. Checking to see if the client is has some VPN or other network software that may restrict network throughput.

    As this reset may be coming from an intermediate device please consider gathering a Network trace with Wireshark, Network Monitor, or Microsoft Message Analyzer.

  • The MSDeploy endpoint is hosted on the Kudu\SCM Web Site and you can check the version being used by  by going to the Powershell window under Debug Console in the SCM site and running this command.

    “[System.Diagnostics.FileVersionInfo]::GetVersionInfo(“D:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe”).FileVersion”

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.