错误的网关部署到Azure(502)

时间:2018-10-07 00:29:05

标签: .net-core azure-devops

背景 我已经通过Azure Dev Ops中的构建管道将.NetCore2项目发布到Azure应用服务。

但是我遇到this issue试图导航到api / values链接 此链接在本地主机上有效。

为了创建具有所需值的web.config,我认为我应该尝试右键单击.sln中的项目并进行部署。

请注意,我使用的是2个应用服务,而不是尝试覆盖其中的一个。

我收到了错误

    Severity    Code    Description Project File    Line    Suppression State
Error       Web deployment task failed. (Could not connect to the remote computer ("myproj.scm.azurewebsites.net") using the specified process ("Web Management Service"). This can happen if a proxy server is interrupting communication with the destination server. Disable the proxy server and try again.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_PROXY_GATEWAY.)
Make sure firewall and network settings on your computer and on the server are configured to allow connections between them. If the issue is not resolved, please contact your local or server administrator.
Error details:
Could not connect to the remote computer ("myproj.scm.azurewebsites.net") using the specified process ("Web Management Service"). This can happen if a proxy server is interrupting communication with the destination server. Disable the proxy server and try again.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_PROXY_GATEWAY.
The remote server returned an error: (502) Bad Gateway. myproj  C:\Program Files\dotnet\sdk\2.1.402\Sdks\Microsoft.NET.Sdk.Publish\build\netstandard1.0\PublishTargets\Microsoft.NET.Sdk.Publish.MSDeploy.targets   139 

(其中myproj表示项目名称)

[更新]

我停止了属于devops管道的应用程序服务,清理了项目,重新构建了解决方案,并成功地将其发布了。

我不确定为什么或是否有必要停止该服务。

此后,我重新启动并重新部署了这两项服务。

0 个答案:

没有答案