I have created a SharePoint Provider hosted App on Azure.

I need to debug it now. I have enabled remote debugging from the Azure Portal. But when I try to debug it from Visual Studio, I get the following error:

System.Runtime.InteropServices.COMException (0x89710023): Unable to connect to the Microsoft Visual Studio Remote Debugger named 'myweb.azurewebsites.net'. The Visual Studio 2015 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)

I have also installed the Azure SDK but unable to debug it.


1 Answer 1


[...]the following ports needs to be opened to be able to remote debug a Azure App Service:

Ports   Incoming/Outgoing   Protocol    Description
3702    Outgoing            UDP         Remote debugger discovery
4020    Outgoing            TCP         Visual Studio 2015
4021    Outgoing            TCP         Visual Studio 2015
4016    Outgoing            TCP         Visual Studio 2012
4018    Outgoing            TCP         Visual Studio 2013

Source: https://msftplayground.com/2016/03/unable-establish-connection-azure-remote-debugging/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.