Web Deploy issue ERROR_CONNECTION_TERMINATED

Published Aug 07 2020 04:18 PM 5,437 Views
Microsoft

While publishing an application from Visual Studio to Azure App Service, you may come across this error message:

 

Web Deploy experienced a connection problem with the server and had to terminate the connection.

 

Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED

Nedim_0-1596842295579.jpeg

 

In the case I worked on, the project publishes successfully to Local IIS and Azure Functions but not to Azure App Service.

 

Solution

Follow the steps below to find a solution to this issue:

  • Uninstall security software in the server and try again
  • Make sure Management Services are installed (Add Role and Features > Web Server)
  • Check if Web Management Services and Web Deploy Agent Service are running
  • Make sure Fiddler or any other similar software is not running during the publish
  • Check if TCP port 8172 are open
1 Comment
%3CLINGO-SUB%20id%3D%22lingo-sub-1574058%22%20slang%3D%22en-US%22%3EWeb%20Deploy%20issue%20ERROR_CONNECTION_TERMINATED%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1574058%22%20slang%3D%22en-US%22%3E%3CP%3EWhile%20publishing%20an%20application%20from%20Visual%20Studio%20to%20Azure%20App%20Service%2C%20you%20may%20come%20across%20this%20error%20message%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3EWeb%20Deploy%20experienced%20a%20connection%20problem%20with%20the%20server%20and%20had%20to%20terminate%20the%20connection.%20%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3ELearn%20more%20at%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fiis%2Fpublish%2Ftroubleshooting-web-deploy%2Fweb-deploy-error-codes%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D221672%23%3C%2FA%3EERROR_CONNECTION_TERMINATED%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Nedim_0-1596842295579.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F211056i55521F1431633532%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Nedim_0-1596842295579.jpeg%22%20alt%3D%22Nedim_0-1596842295579.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20case%20I%20worked%20on%2C%20the%20project%20publishes%20successfully%20to%20Local%20IIS%20and%20Azure%20Functions%20but%20not%20to%20Azure%20App%20Service.%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--594301228%22%20id%3D%22toc-hId--594299343%22%3E%26nbsp%3B%3C%2FH4%3E%0A%3CH4%20id%3D%22toc-hId-1893211605%22%20id%3D%22toc-hId-1893213490%22%3ESolution%3C%2FH4%3E%0A%3CP%3EFollow%20the%20steps%20below%20to%20find%20a%20solution%20to%20this%20issue%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EUninstall%20security%20software%20in%20the%20server%20and%20try%20again%3C%2FLI%3E%0A%3CLI%3EMake%20sure%20Management%20Services%20are%20installed%20(Add%20Role%20and%20Features%20%26gt%3B%20Web%20Server)%3C%2FLI%3E%0A%3CLI%3ECheck%20if%20Web%20Management%20Services%20and%20Web%20Deploy%20Agent%20Service%26nbsp%3Bare%20running%3C%2FLI%3E%0A%3CLI%3EMake%20sure%20Fiddler%20or%20any%20other%20similar%20software%20is%20not%20running%20during%20the%20publish%3C%2FLI%3E%0A%3CLI%3ECheck%20if%26nbsp%3BTCP%20port%208172%20are%20open%3C%2FLI%3E%0A%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1574058%22%20slang%3D%22en-US%22%3E%3CP%3EWhile%20publishing%20an%20application%20from%20Visual%20Studio%20to%20Azure%20App%20Service%2C%20you%20may%20come%20across%20this%20error%20message.%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Version history
Last update:
‎Aug 07 2020 04:18 PM
Updated by: