如何使用 VSTS 修复 azure web 应用程序部署中的 ERROR_DESTINATION_NOT_REACHABLE 错误

how to fix ERROR_DESTINATION_NOT_REACHABLE error in azure web app deployment using VSTS

我正在使用 VSTS 管道将 asp.net 核心 2.2 MVC 部署到 Azure Web 应用程序。 部署到 Azure 的最后一步失败 - 请查看以下错误:

##[error]Failed to deploy web package to App Service. 2019-01-08T21:39:47.3810424Z ##[error]Error Code: ERROR_DESTINATION_NOT_REACHABLE More Information: Could not connect to the remote computer ("our website url"). 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. Error: Unable to connect to the remote server Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond ????:443

我什至尝试过使应用离线,但没有成功:

但是,如果我通过 Visual studio 发布网络应用程序,它工作正常。

问题是我们使用的订阅有防火墙。因此,即使在 Web 服务的应用程序设置中添加 "WEBSITE_WEBDEPLOY_USE_SCM" = false 之类的操作也无法进入防火墙。

我们能想到的唯一解决方案是在位于同一防火墙内的 VM 中创建一个代理。

在 Azure 门户中重新创建 Web 应用 -> 确保目标框架选择正确。

我之前在门户中设置 Web 应用程序时不小心将其设置为 docker,并且也产生了此错误。我正在使用 MVC .NET 4.7 项目并尝试使用网络部署。

希望这可以帮助可能在 Azure 门户中错误设置 Web 应用程序的人。