Search code examples
.netdebuggingvisual-studio-2008remote-debuggingmanaged

Is there any way to use remote debugging for managed apps without disabling Host firewalls?


I have tried to setup Remote debugging for managed apps from my laptop (host)(win 8.1) to Oracle virtual box vm (client) (win xp). And I'm not able to disable my laptop’s firewall due to my company rules. So i have end up with an error from visual studio

Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named -------. The Visual Studio Remote Debugger on the target computer cannot connect back to this computer. Authentication failed. Please see Help for assistance.

Note: Remote debugger(visual studio 2008)

First is there any way to use remote debugging for managed apps without disabling host firewalls? If so please help me to resolve this issue.


Solution

  • Finally i have found a way to use remote debugging without disabling the host firewalls.

    HOST:

    1. you have to allow your msvsmon.exe application through inbound rules from

      Control Panel\All Control Panel Items\Windows Firewall\Advance settings\inbound rules\new rule

      program->program path -> allow the connection -> check domain,private,public -> enter name-> finish.

    2. Then you have add remote debugger port 135 to inbound rules

      Control Panel\All Control Panel Items\Windows Firewall\Advance settings\inbound rules\new rule

      port -> tcp -> port number 135 -> allow connection -> check domain,private,public -> enter name -> finish.

    3. visual studio -> attach to process (managed apps)

    CLIENT:

    1. if your host and client are in separate domain then you have to run msvsmon.exe as

      RUNAS /user:hostusername@domain /netonly "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86\msvsmon.exe"

    enter hostpassword.

    1. disable firewall settings.

      after doing these setting remote debugging for managed apps have worked for me.

    configs: host: win 8.1 client : win xp domain : separate debugger : visual studio 2008