Azure App Service: Failed to Deploy. – ERROR

Posted by

Error: Error: Could not complete the request to remote agent URL ‘https://<url>.azurewebsites.net/msdeploy.axd?site=<url>’.

Error: The underlying connection was closed: An unexpected error occurred on a send.

Error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

Error: An existing connection was forcibly closed by the remote host

If you started seeing following error on your build procedure (could be Azure DevOps agent or Jenkins), it’s due to some changes on Microsoft Azure Service. You can trach the issue here:

https://github.com/microsoft/azure-pipelines-tasks/issues/12444

What are your options here?

  1. Set Minimum TLS Version to 1.0
    • In Azure on the App Service (one or multiple one; especialy if you work with Sitecore infrastrcture with multiple CD’s and CM’s), go to:
      • Open reported App Service
      • Click on TLS/SSL settings
      • Under ‘Bindings‘ tab set ‘Minimum TLS Version‘ to ‘1.0
      • Restart the service
      • Try to deploy again
  1. Update your agent to .NET v4.8+
    • After you update your agent, reset it
    • Try to deploy again