Problems when trying to setup remote debug across network domains
Action
When remote debugging a windows application (windows form/service) across 2 networks, 2 machines on 2 different domains, you may get an error message similar to this one if there is a Network Address Translation (NAT) or a hardware firewall/router between the 2 machines.
“Error while trying to run project: Unable to start debugging. The Visual Studio Remote Debugger on the target computer cannot connect back to this computer. A firewall may be preventing communication via DCOM to the local computer”
Result
Even after setting all the firewall settings on the machines correctly and on the local machine when going to Debug->Attach to Process, and browsing on the remote machine the process to be debugged appears but still unable to attach to the process and continue to get the same error message.
Cause
This is by design. The router/NAT is causing the problem with communication between the 2 machines in order to debug the application.
Resolution
There isn’t a way to by-pass the NAT, so one of the following needs to happen:
1. Move both machines to one side of the NAT, server side or client side.
2. Move the firewall up a level making both remote and local machines under the same firewall/NAT
More Information
One way to make sure both machines are communicating correctly is to use net view command from both server and client to see if each can see the other.
Net view
http://technet.microsoft.com/en-us/library/bb490719.aspx (http://technet.microsoft.com/en-us/library/bb490719.aspx)
DISCLAIMER
MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.
APPLIES TO
|
|
Microsoft Visual Studio .NET 2002 Professional Edition |
|
|
Microsoft Visual Studio .NET 2003 Professional Edition |
|
|
Microsoft Visual Studio 2005 Professional Edition |
|
|
Microsoft Visual Studio 2008 Professional Edition |
——————————————–
Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
Microsoft Corporation. All rights reserved. Terms of Use | Trademarks
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply