我正在尝试使用 Visual Studio 2017 Professional 远程调试部署为 Azure 应用服务的 Asp.Net Core Web 应用程序(使用 Web API)项目。
按照记录的说明进行操作here https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging-azure。本质上,使用服务器资源管理器-->应用服务-->附加调试器
此外,如上所述启用必要的防火墙端口。我打开的是TCP(4022、4023)和UDP(3702)。另外,请确保远程调试器应用程序位于 Windows 防火墙允许的应用程序列表中。文档为firewall https://learn.microsoft.com/en-us/visualstudio/debugger/configure-the-windows-firewall-for-remote-debugging steps.
尽管进行了所有设置,我还是收到以下错误
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)
任何建议都会有帮助。
问题已解决。我们必须在企业防火墙上打开 VS 2019 的出站端口 4024、VS 2017 的 4022 和 VS 2015 的 4020。
欲了解更多信息,请查看这些:
https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugger-port-assignments?view=vs-2019 https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugger-port-assignments?view=vs-2019
https://learn.microsoft.com/en-us/visualstudio/debugger/configure-the-windows-firewall-for-remote-debugging?view=vs-2019 https://learn.microsoft.com/en-us/visualstudio/debugger/configure-the-windows-firewall-for-remote-debugging?view=vs-2019
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)