简体   繁体   English

无法从 Visual Studio 2019 社区版附加到 Azure 应用服务

[英]Unable to attach to Azure App Service from Visual Studio 2019 Community edition

I have an Azure App Service which hosts my Web Api solution.我有一个 Azure 应用服务,它托管我的 Web Api 解决方案。 Sometimes, when there's a production issue which can not be reproduced on local environment, I usually attach a Visual Studio 2019 (community edition) debugger to that live instance.有时,当出现无法在本地环境中重现的生产问题时,我通常会将 Visual Studio 2019(社区版)调试器附加到该实时实例。

For some reason, now it has stopped.由于某种原因,现在它停止了。 When I try to attach the debugger by making a reference to Cloud Explorer > Pay As You Go > App Services > my-app-service (right-click and Attach Debugger) I get the following error:当我尝试通过引用 Cloud Explorer > Pay As You Go > App Services > my-app-service(右键单击并附加调试器)来附加调试器时,我收到以下错误:

System.Runtime.InteropServices.COMException (0x89710023): Unable to connect to the Microsoft Visual Studio Remote Debugger named '************************.azurewebsites.net'.  The connection with the remote endpoint was terminated.

at Microsoft.WebTools.Azure.VS.Operations.IDebuggerInternal120.ConnectToServer(String szServerName, VsDebugRemoteConnectOptions[] pConnectOptions, CONNECT_REASON ConnectReason, Int32 fIncrementUsageCount, IDebugCoreServer3& ppServer)
at Microsoft.WebTools.Azure.VS.Operations.RemoteDiagnosticsSessionBase`1.ConnectToServer(String site, String user, String password)

I have no idea why is that.我不知道为什么会这样。 Tried to logout/login from my Azure account, also tried to restart the app service oh Azure but still nothing.尝试从我的 Azure 帐户注销/登录,还尝试重新启动应用程序服务哦 Azure 但仍然没有。 Also tried to re-deploy the app but again nothing.还尝试重新部署该应用程序,但又没有。

  • I have tried to remote debug the Azure App service from VS 2019 Community Edition, got the same error.我尝试从 VS 2019 社区版远程调试 Azure 应用服务,得到了同样的错误。

Tried the below approaches:尝试了以下方法:

Approach 1:方法一:

In Visual Studio => View => Cloud Explorer => Select your App Service => Right click and Attach Debugger.在 Visual Studio => View => Cloud Explorer => Select 您的应用服务 => 右键单击并附加调试器。

Got the below error.得到以下错误。

在此处输入图像描述

Approach 2:方法二:

In VS => Debug tab => Attach to process.在 VS => 调试选项卡 => 附加到进程。 In Connection target enter the deployed URL name without https Ex: YourWebAppName.azurewebsites.net在 Connection target 中输入部署的 URL 名称,不带https例如: YourWebAppName.azurewebsites.net

在此处输入图像描述

  • It asks to enter the credentials.它要求输入凭据。 In Deployed Azure Web App=> click on Get Publish profile, there you will find the username name and password.在 Deployed Azure Web App=> 点击 Get Publish profile,在那里你会找到用户名和密码。

Error:错误:

在此处输入图像描述

Approach 3:方法3:

In Publish window => Hosting => Attach Debugger在发布 window => 托管 => 附加调试器在此处输入图像描述

在此处输入图像描述

Refer Configure ports for more information有关详细信息,请参阅配置端口

As mentioned in official MSDoc , if you still face after checking all the approaches, you can report the issue.如官方MSDoc中所述,如果您在检查所有方法后仍然遇到问题,您可以报告问题。

You can follow the GitHub link for further updates.您可以按照GitHub链接进行进一步更新。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法从 Visual Studio 2019 将 web 部署到 Linux 应用服务 - Unable to web deploy to Linux App Service from Visual Studio 2019 无法通过 Visual Studio 将调试器附加到 Azure Linux Web 服务 - Unable to attach debugger through Visual Studio to Azure Linux Web Service 从Visual Studio,无法发布到Azure App Service - From Visual Studio, unable to publish to Azure App Service 带有 Visual Studio 2019 Community 的 Windows 10 无法将我的项目发布到 Azure 容器注册表 - Windows 10 with Visual Studio 2019 Community is unable to publish my project to Azure Container Registry 如何使用 Visual Studio 中的路径映射将调试器附加到 Azure 应用服务? - How to attach a debugger to Azure App Service with path mapping in Visual Studio? 无法使用 Visual Studio 2019 部署我的 Azure Web 应用程序 - Unable to deploy my Azure Web App using visual studio 2019 我无法从 Visual Studio 2019 登录 Azure 服务 - I cannot sign-in Azure service from Visual Studio 2019 从现有的 Azure Web 应用程序创建 Visual Studio 2019 项目 - Create Visual Studio 2019 project from existing Azure Web App 在 Visual Studio 2019 中,即使应用服务仍在运行,如何强制部署 Azure 应用服务 - In Visual Studio 2019, how to force deploy Azure App Service even if the app service is still running Visual Studio 2019 IIS 配置文件创建 web.config 文件,该文件破坏了 Azure 应用服务 - Visual Studio 2019 IIS profile creates web.config file that breaks Azure App Service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM