Remote Debug - Azure Web App

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

The following are the instructions described here . Essentially using Server Explorer -> App Service -> Attach Debugger

Also included the required firewall ports as indicated. I opened TCP (4022, 4023) and UDP (3702). Also, make sure the remote debugger application is included in the list of allowed applications in Windows Firewall. Documentation for firewall steps .

Despite all the settings, I am getting the following error

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

Any suggestion would be helpful.

+3


source to share


3 answers


The problem has been resolved. We had to open outgoing ports 4022 for VS 2017 and 4020 for VS 2015 on the corporate firewall.



+2


source


I also had this problem. I solved this by changing the platform from 32-bit to 64-bit in the app settings as I am trying to debug from a 64-bit machine.



Screenshot

+1


source


It seems remote debugging is not enabled for your app service.

Open the App service in the Azure portal and go to App Settings . Then turn Remote Debugging On and select Visual Studio 2017 Version .

It should look like this: Source of screenshotsenter image description here

Hope this helps.

0


source







All Articles