Compartir a través de


ERROR_CONNECTION_TERMINATED msdeploy web deploy

This article has been moved to its new home here: https://benperk.github.io/msdn/2015/2015-09-error_connection_terminated-msdeploy-web-deploy.html

NOTE:  This exception happens most often when your corporate IT department has a firewall rule or proxy which is preventing the deployment to be made.  The first step should be that you attempt a deployment outside of your corporate network, perhaps from home when connected on your private ISP.

I was doing some deployments to my Azure Web App one Saturday night and started getting this error show in Figure 1.

Figure 1, ERROR_CONNECTION_TERMINATED Azure Web App, web deploy

Here is the message specifically:

Web deployment task failed. (Web Deploy experienced a connection problem with the server and had to terminate the connection.  Contact your server administrator if the problem persists.  Learn more at: https://go.microsoft.com/fwlink/?LinkId=221672\#ERROR\_CONNECTION\_TERMINATED.)     

I did some checks to make sure the platform was ok and that the SCM W3WP process was up and running as expected, while I was checking, I noticed how slow my internet connection was.  Accessing any web site was very slow.  Therefore, I concluded this issue has to do with the network speed and ability to stay connected and send the content to the Azure Web App.

Just to be certain, I attempted the same in the office.  I used a tool called CLUMSY 0.2 to simulate a slow network and performed a similar kind of deployment, and bang, the same issue.

I performed the same using the Publish-AzureWebsiteProject PowerShell command, and had the same results as shown in Figure 2.

Figure 2, ERROR_CONNECTION_TERMINATED PowerShell deployment

The first 2 attempts worked just fine, but as soon as the network stated being slow or packets being dropped, exceptions started happening.

I looked around for some kind of explanation for this exception and it was not easy to find any feedback on it.  This is just my experience with it and because I could reproduce it, there is a high probability that the issue is with slow networks connectivity.

Additionally, perhaps the size of deployment is very big and times out.  You might consider using FTP to deploy you Azure Web App initially and then deploy the changes using web deploy, PowerShell or the Publish… utility in Visual Studio.

NOTE:  This wouldn’t only apply to Azure Web App, I’d expect the same to be true when using Web Deploy to deploy to any web site where the network is having some latency problems.

NOTE 2:  Check if Fiddler is running, if it is, stop it.  See comment section, thanks.

Comments

  • Anonymous
    February 04, 2016
    Any solutions or workaround for this issues?? slow connection causing web deployment failed?

  • Anonymous
    February 04, 2016
    Hi Chsy, I just worked through it.  At some point it just went away, it was caused by my home slow internet connection.

  • Anonymous
    March 01, 2016
    Fiddler running in the background was the culprit here..

    • Anonymous
      November 28, 2016
      This help me
    • Anonymous
      April 22, 2019
      that helped
  • Anonymous
    March 11, 2016
    Same here. Fiddler running is always stopping my deployments.

  • Anonymous
    May 16, 2016
    I am not running any fiddler , but I am getting [Web deployment task failed] in some instances .

  • Anonymous
    May 18, 2016
    The comment has been removed

    • Anonymous
      June 14, 2016
      The comment has been removed
      • Anonymous
        February 15, 2017
        The comment has been removed
        • Anonymous
          March 15, 2017
          The comment has been removed
    • Anonymous
      February 15, 2017
      The comment has been removed
  • Anonymous
    September 23, 2016
    Thank you! I was not able to do a web deploy period. But I was able to do the Web Deploy Package approach you described here.

  • Anonymous
    October 19, 2016
    Fiddler was the source of my problems too.

  • Anonymous
    January 17, 2017
    fiddler running ! thanks for comments all (Y)

  • Anonymous
    November 21, 2017
    Disabling proxy worked fine.

  • Anonymous
    February 10, 2018
    Fiddler was the problem for me as well.