ERROR_CONNECTION_TERMINATED msdeploy web deploy


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: http://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 (14)

  1. chsy says:

    Any solutions or workaround for this issues?? slow connection causing web deployment failed?

  2. Hi Chsy, I just worked through it.  At some point it just went away, it was caused by my home slow internet connection.

  3. Fiddler says:

    Fiddler running in the background was the culprit here..

    1. riseres says:

      This help me

  4. Same here. Fiddler running is always stopping my deployments.

  5. Naveen says:

    I am not running any fiddler , but I am getting [Web deployment task failed] in some instances .

  6. Village Media says:

    I think this can also happen if you're attached to a domain controller but you've manually changed/set your DNS server to something off the domain. At least that was my case, changing back to the DC DNS fixed it. Unless it was purely coincidence and my Internet service was slow but I don't think that was the case.

    1. alerancur says:

      Thanks Village Media, I've been struggling with this for two long days, trying to find a solution with my hosting provider and my ISP, your solution really saved my day. I didn't remember I changed my DNS to Google's a few days ago when our DNS start failing, switched it back to our DC DNS and voilá, web deploy working again. At first I was getting a ERROR_USER_UNAUTHORIZED error code and then a ERROR_CONNECTION_TERMINATED without doing any changes. Lucky me I found this post, Thanks again!

      1. Jerome S says:

        Reverting back to automatic DNS (instead of openDNS ones) also allowed me to publish. Same goes for my colleague.
        Really wouldn't have thought of that.

        1. Village Media says:

          I can't believe this. Been fighting this issue for about an hour, start googling for an answer, and find my own answer from about a year ago. I guess I'm getting amnesia. I recently set a DHCP reservation for my computer and didn't realize that in so doing I changed the DNS server settings on my computer and that was causing me the issue.

    2. Michele says:

      I confirm what alerancur wrote, changing my DNS from Google to those of my ISP solved the issue.
      Thanks a lot!

  7. Sean says:

    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.

  8. Chris says:

    Fiddler was the source of my problems too.

  9. Tomy Varghese says:

    fiddler running ! thanks for comments all (Y)

Skip to main content