无法连接到远程调试-Web App Azure [英] Unable to connect to the Remote Debugging - Web App Azure

查看:81
本文介绍了无法连接到远程调试-Web App Azure的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Visual Studio 2017 Professional远程调试作为Azure应用服务部署的Asp.Net Core Web应用程序(具有Web API).

I am trying to remote debug an Asp.Net Core Web Application (with Web API) project deployed as an Azure App Service with Visual Studio 2017 Professional.

按照此处中记录的说明进行操作.本质上,使用服务器资源管理器->应用程序服务->附加调试器

Followed the instructions as documented here. Essentially, using the Server Explorer-->App Service-->Attach Debugger

此外,还如上所述启用了必要的防火墙端口.我打开的是TCP(4022,4023)和UDP(3702).此外,请确保Windows防火墙中允许的应用程序列表中包含远程调试器应用程序.防火墙的文档a>步骤.

Also, enabled the necessary firewall ports as mentioned. The ones I opened are TCP (4022, 4023) and UDP (3702). Also, ensure remote debugger application is in allowed list of apps in Windows Firewall. Documentation for the firewall steps.

尽管进行了所有设置,但出现以下错误

Despite all the settings, I am getting following error

System.Runtime.InteropServices.COMException (0x89710023): Unable to connect to the Microsoft Visual Studio Remote Debugger named 'essamplepoc2.azurewebsites.net'.  The Visual Studio 2017 Remote Debugger (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging.
   at Microsoft.VisualStudio.Debugger.Interop.Internal.IDebuggerInternal120.ConnectToServer(String szServerName, VsDebugRemoteConnectOptions[] pConnectOptions, CONNECT_REASON ConnectReason, Int32 fIncrementUsageCount, IDebugCoreServer3& ppServer)
   at Microsoft.VisualStudio.Web.Azure.MicrosoftWeb.Operations.RemoteDiagnosticsSessionBase.ConnectToServer(String site, String user, String password)

任何建议都会有所帮助.

Any suggestion would be helpful.

推荐答案

问题已解决.我们必须在公司防火墙上打开VS 2019的出站端口4024,VS 2017的出端口4022和VS 2015的出端口4020.

The issue is resolved. We had to open outbound ports 4024 for VS 2019, 4022 for VS 2017 and 4020 for VS 2015 on corporate firewall.

有关更多信息,请查看以下内容:

For more info check these out:

https://docs.microsoft.com/zh-cn/visualstudio/debugger/configure-the-windows-firewall-for-remote-debugging?view=vs-2019

这篇关于无法连接到远程调试-Web App Azure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆