【问题标题】:Unable to connect to the Remote Debugging - Web App Azure无法连接到远程调试 - Web 应用 Azure
【发布时间】:2017-12-12 02:52:29
【问题描述】:

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

按照here 中记录的说明进行操作。本质上,使用 Server Explorer-->App Service-->Attach Debugger

此外,如前所述,启用必要的防火墙端口。我打开的是TCP(4022、4023)和UDP(3702)。此外,请确保远程调试器应用程序位于 Windows 防火墙中允许的应用程序列表中。 firewall 步骤的文档。

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

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)

任何建议都会有所帮助。

【问题讨论】:

  • 你能解决这个问题吗

标签: remote-debugging azure-web-app-service azure-api-apps


【解决方案1】:

问题已解决。我们必须在公司防火墙上为 VS 2019 开放出站端口 4024、为 VS 2017 开放 4022 和为 VS 2015 开放 4020。

欲了解更多信息,请查看以下内容:

【讨论】:

    【解决方案2】:

    我也有这个问题。当我尝试从 64 位机器调试时,我通过在应用程序设置中将平台从 32 位更改为 64 位来解决它。

    【讨论】:

      【解决方案3】:

      您的应用服务似乎没有开启远程调试。

      Azure portal 中打开您的应用服务并转到应用程序设置。然后将 Remote Debugging 设为 On 并选择 Visual Studio Version2017

      它应该看起来像这样: Screenshot source

      我希望这会有所帮助。

      【讨论】:

      • 您是否尝试过使用“调试”>“附加到进程”手动附加调试器。
      • 尝试了附加到进程选项,但是当我尝试通过指定站点的 URL 来附加进程时,它失败了 - 无法连接到名为“mysite,azurewebsites”的 Microsoft Visual Studio 远程调试器。净:4022'。 Visual Studio 2017 远程调试器 (MSVSMON>EXE) 似乎没有在远程计算机上运行。这可能是因为防火墙阻止了与远程计算机的通信。
      • 如果您远程调试其他 azure web 应用程序是否会出现同样的问题?
      • 我也有同样的问题。尝试了一堆不同的东西。这有什么好运气吗?
      【解决方案4】:

      首先,什么不起作用。在我的防火墙中打开端口对我不起作用。重新启动我的本地机器不起作用,在 Azure 中重新启动应用程序,也没有使用安装程序更新 VS2019。我不断得到:

      System.Runtime.InteropServices.COMException (0x89710023):无法连接到名为“empirepipedriveapi-newversion.azurewebsites.net”的 Microsoft Visual Studio 远程调试器。与远程端点的连接已终止。

      最后,什么 DID 起作用了,我删除了部署槽然后再次添加它,我删除了 Visual Studio 2019 中的发布配置文件并重新创建它,发布了应用程序(甚至没有重新编译它),然后能够连接(我确实先刷新了 Cloud Explorer 中的可用插槽,只是为了过于小心)。我相信,这是大约一年内第二次,在极少数情况下,部署槽可能会损坏。我注意到这次发布应用程序时,它花费了更长的时间,而且似乎发生了更多的活动,这让我相信旧插槽中的代码在每次发布时都没有刷新,它一定已经损坏了.

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2018-07-01
        • 2014-07-31
        • 1970-01-01
        • 2017-07-19
        • 2015-02-08
        • 1970-01-01
        • 2017-04-15
        相关资源
        最近更新 更多