Azure Publish Error; Web deployment task failed. (Could not connect to the remote computer [...])


I recently encountered a connection problem while publishing an application service to Azure from behind my employer’s firewall. Here is the complete error message:

Error 1 Web deployment task failed. (Could not connect to the remote computer [...]). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.)

This is obviously a showstopper that hinders you from getting your site published to the public cloud from your employer’s company domain. Fear not though, as there is a solution to this; by disabling SCM. The solution is based on an answer from Patrick McCurley at StackOverflow:

  1. Go to the Azure Portal.
  2. Click on App Services.
  3. Click on your application service.
  4. Click on Application settings.
  5. Scroll down to Application settings.
  6. Click Add new setting, and add the following entry:

Name: WEBSITE_WEBDEPLOY_USE_SCM, Value: false

  1. Click on Save and close the Application settings window.
  2. Click on your application service.
  3. Download the publish profile by clicking on Get publish profile.
  4. Import the publish profile when publishing your application service to Azure from Visual Studio.

This effectively disables SCM and enables you to publish your application service to Azure.