无法使用 VS2010 进行远程调试

发布于 2024-09-25 00:00:56 字数 771 浏览 2 评论 0原文

我在同一公司域中有一台服务器和一台工作站。我的用户是两台计算机上的本地管理员。我已经安装了 VS2010 版本的 MSVSMON 并将其设置为在我的用户 DOMAIN\greg.b 下的服务器上作为服务运行(我给自己设置了“作为服务登录”)。我使用域帐户登录服务器并启动远程调试监视器。然后我从 Visual Studio 连接到服务器。在服务器上的监视器中我可以看到

23/09/2010 16:26:33 DOMAIN\greg.b 已连接。

过了一会儿,我从 Visual Studio 中收到一个对话框,显示

无法连接到名为“SERVER_NAME”的 Microsoft Visual Studio 远程调试监视器。目标计算机上的 Visual Studio 远程调试器无法连接回此计算机。防火墙可能阻止通过 DCOM 与本地计算机进行通信。

我在工作站和服务器上都打开了 DCOM 端口 (TCP 135) 详细信息请参见此处
我已经在关闭 Windows 防火墙服务的情况下尝试过。

我完全被难住了!

服务器运行的是 Windows 2003 Standard SP2 32 位,运行 x86 MSVSMON。我的工作站运行的是 Windows 7 Pro 64Bit 和 VS2010 Pro。

I have a server and a workstation on the same corporate domain. My user is a local administrator on both machines. I have Installed the VS2010 version of MSVSMON and set it to run as a service on the server under my user DOMAIN\greg.b (I gave myself "log on as service"). I log onto the server using my domain account and start Remote Debug monitor. I then connect to the server from my Visual Studio. In the monitor on the server I can see

23/09/2010 16:26:33 DOMAIN\greg.b connected.

Then a moment later, I get a dialog from Visual Studio saying

Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named 'SERVER_NAME'. 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.

I've got the DCOM ports open (TCP 135) on both my workstation and server as detailed here.
I have tried it with the Windows Firewall service turned off.

I'm completely stumped!

The server is running Windows 2003 Standard SP2 32bit running the x86 MSVSMON. My workstation is running Windows 7 Pro 64Bit and VS2010 Pro.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

梦断已成空 2024-10-02 00:00:56

确保 devenv.exe (Visual Studio) 位于防火墙程序例外列表中,并且选中了 DOMAIN 复选框!

我处于同样的情况,停止了我的计算机(win7 x64)上运行的防火墙服务,但在我进行此更改之前它不起作用。

Make sure devenv.exe (visual studio) is in the firewall program exceptions list on the with the DOMAIN checkbox checked!

I was in the same situation, stopped the firewall services running on my machine (win7 x64) but it did not work until I made this change.

我早已燃尽 2024-10-02 00:00:56

我遇到了同样的问题,我在虚拟机中运行 VS2010,我将网络从 NAT 更改为桥接,可以 ping 2 种方式,并且它有效。

I was having the same problem, I was running VS2010 in a VM, I changed networking from NAT to Bridged, could ping 2 ways, and it worked.

走走停停 2024-10-02 00:00:56

就我而言:由于远程计算机不是本地子网的一部分,我必须去
Windows 防火墙 ->高级设置->在绑定规则中
选择 MS Visual Studio 的规则并将远程计算机的 IP 地址添加到“范围”部分。
这是对上述 Windows 防火墙设置的补充。

In my case : Since the remote machine was not part of the local subnet, I had to go to
Windows Firewall -> Advanced Settings -> In bound rules.
Select the rule for MS Visual Studio and add remote machine's IP address to "Scope" section.
This was in addition to the windows firewall settings described above.

亣腦蒛氧 2024-10-02 00:00:56

对我的情况有帮助的是:

在 VS 所在的计算机上运行 dcomcnfg.exe,转到:

组件服务 -> 。计算机 ->我的电脑 ->属性-> COM 安全 ->访问权限->编辑限制

您应该授予对匿名登录的远程访问权限。

不要乱搞其他权限——可能会给你带来麻烦。

What helped in my case was the following:

Run dcomcnfg.exe on the machine where your VS is, go to:

Component Services -> Computers -> My Computer -> Properties -> COM Security -> Access Permissions -> Edit Limits

You should grant remote access to the ANONYMOUS LOGON.

Don't mess around with the other permissions - could cause you trouble.

不念旧人 2024-10-02 00:00:56

我想这个问题有一百万个原因!
我尝试了上述所有答案,但没有任何对我有用,但这个:
我设法通过禁用使用“托管兼容模式”的选项来使其工作,

为此,请转到 VS 中的选项,例如:
工具->选项->调试->一般->禁用“使用托管兼容模式”

I guess there are a million reasons for this problem!
I tried all the above answers but nothing worked for me but this:
I managed to get it working by disabling the option to use the "managed compatibility mode"

For that, go to the options in VS, like:
Tools -> Options -> Debugging -> General -> disable "Use Managed Compatibility Mode"

等待圉鍢 2024-10-02 00:00:56

解决我的问题的是

  1. 关闭本机兼容模式和托管兼容模式。
  2. 在 Visual Studio 2013 中,关闭“启用本机编辑并继续”。

输入图像描述这里
https://msdn.microsoft.com/en-us/library/2dbesfyx.aspx

我还重新启动了计算机(Windows 基本规则!)

What solved my problem was this

  1. Turn off Native Compatibility Mode and Managed Compatibility Mode.
  2. In Visual Studio 2013, turn off Enable native Edit and Continue.

enter image description here
https://msdn.microsoft.com/en-us/library/2dbesfyx.aspx

I also restart the computer (windows basic rule!)

夜深人未静 2024-10-02 00:00:56

这里同样的问题。我的原因是本地计算机启用了趋势网络安全,并且它阻止了连接。我无法阻止它,因为我需要密码,所以我只是删除了所有趋势进程,然后它工作正常。因此,您可以检查是否启用了某些防病毒或安全服务并且可能阻止访问。

Same problem here. My reason was that Trend network security was enabled in the local computer, and it was blocking the connection. I could not stop it because I needed a password, so I just deleted all the Trend processes, and then it worked fine. So you could check if some antivirus or security service is enabled and could be blocking the access.

穿越时光隧道 2024-10-02 00:00:56

我刚刚遇到这个问题(以前从未遇到过这个问题,我一直远程调试)并解决了它。

我做的第一件事就是将问题范围缩小到我的机器上的问题。当我禁用防火墙时,发现一切又恢复正常了,所以我知道这是我的机器和我的防火墙。

msdn 页面位于 http://msdn.microsoft。 com/en-us/library/ee126350(v=vs.100).aspx 表示如果防火墙列表中列出了“Microsoft Visual Studio”,请单击“允许其他程序”并再次选择它。

当我单击“允许另一个程序”时,会弹出一个应用程序列表,但 Microsoft Visual Studio 不在该列表中,因此我浏览到 devenv.exe,并收到一条消息,表明它已在列表中!幸运的是,它告诉我它认为它在 Microsoft SQL Server Data Tools 列表中。

因此,我删除了“Microsoft Visual Studio”条目,因为显然列表中已经存在相同的规则,但具有不同的名称和中提琴,一切都再次正常。

我猜测更新或者我的 VS 2013 Express 安装以某种方式影响了防火墙设置,并且两次出现该规则使我的计算机感到困惑。

I just had this problem (never had this problem previously, I remote debug all the time) and resolved it.

First thing I did was narrow it down to being a problem on my machine. When I disabled my firewall lo and behold things worked again so I knew it was my machine and my firewall.

The msdn page at http://msdn.microsoft.com/en-us/library/ee126350(v=vs.100).aspx says if 'Microsoft Visual Studio' is listed in the firewall list to click 'Allow another program' and select it again.

When I clicked 'Allow another program' a list of applications popped up and but Microsoft Visual Studio was not in THAT list so I browsed to devenv.exe and I got a message that it was already in the list! Fortunately it told me that it thought it was in the list as Microsoft SQL Server Data Tools.

So I removed the entry for 'Microsoft Visual Studio' since apparently the same rule was already in the list but with a different name and viola everything works again.

I'm guessing an update or perhaps my VS 2013 Express install somehow affected the firewall settings and having the rule in there twice was confusing my computer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文