跨域远程调试

发布于 2024-07-05 18:34:26 字数 385 浏览 9 评论 0原文

我在两个不同的域中有两台机器。 我在两者上都安装了 VS 2005。 我想在它们之间进行远程调试。 如果没有身份验证,这是可能的,但我想调试托管代码。 我不想直接调试,因为它真的很糟糕。

当我尝试使用调试器附加时,我收到消息“此工作站和主域之间的信任关系失败。” 知道如何克服这个问题吗? 我尝试了在两台机器上添加相同的本地用户名的技巧,但没有成功。

编辑:我在两台机器上都有相同的本地用户。 我使用本地用户通过 RunAs 启动了 VS2005 和调试监视器。 我在调试计算机上打开了 Windows 审核,我看到 VS2005 计算机上的本地用户正在尝试登录。 但他失败并出现错误 0xC000018D (ERROR_TRUSTED_RELATIONSHIP_FAILURE)

I have two machines in two different domains. On both I have VS 2005 installed. I want remote debug between them. Without authentication it is possible but I want to debug managed code. I don't want to debug directly since it is really crappy machine.

When I try to attach with debugger I get message "The trust relationship between this workstation and primary domain failed." Any idea how to overcome this ? I tried tricks with adding same local username on both machines but with no luck.

EDIT: I have same local users on both machines. I started both VS2005 and Debugging monitor with RunAs using local users. I turned Windows Auditing on debug machine and I see that local user from VS2005 machine is trying to logon. But he fails with error 0xC000018D (ERROR_TRUSTED_RELATIONSHIP_FAILURE)

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

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

发布评论

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

评论(3

帝王念 2024-07-12 18:34:27

该博客文章并不完全清楚这是否可行,但我能够将 Visual Studio 作为我的域帐户运行,并且仍然可以在不在域上的计算机上调试进程。

我在 Active Directory 域 DOMAIN 上有一台物理开发机器 PHYSICAL。 我已登录并以 DOMAIN\employee 身份运行 Visual Studio。

我有一个虚拟机 VIRTUAL,它根本没有附加到 Active Directory 域。 这是运行我要调试的进程的机器。

正如博客文章所述,创建本地帐户 PHYSICAL\employee(在 PHYSICAL 上)和 VIRTUAL\employee(在 VIRTUAL 上) >)。 他们都必须是管理员并且与 DOMAIN\employee 具有相同的密码。

远程调试器和要调试的进程必须在以 VIRTUAL\employee 身份登录时在 VIRTUAL 上运行。 然后,在以 DOMAIN\employee 身份登录 PHYSICAL 时,我可以使用“附加到进程...”并连接到 VIRTUAL 来获取进程列表。

The blog post wasn't totally clear that this would work, but I was able to run Visual Studio as my domain account and still debug a process on a machine that was not on a domain.

I have a physical development machine PHYSICAL on a Active Directory domain DOMAIN. I'm logged in and running Visual Studio as DOMAIN\employee.

I have a virtual machine VIRTUAL that is not attached to an Active Directory domain at all. This is the machine running the process I want to debug.

Like the blog post says, create local accounts PHYSICAL\employee (on PHYSICAL) and VIRTUAL\employee (on VIRTUAL). They both must be Administrators and have the same password as DOMAIN\employee.

The remote debugger and the process to debug must be run on VIRTUAL while logged in as VIRTUAL\employee. Then on PHYSICAL while logged in as DOMAIN\employee I can use "Attach to Process..." and connect to VIRTUAL to get a process list.

最偏执的依靠 2024-07-12 18:34:27

我似乎记得,有时我发现在运行 msvcmon (或者本周它被称为远程调试存根)时使用 RunAs 很有用,可以强制它以您设置的相同用户身份启动在两台机器上。

我猜想,在您运行 VS 的计算机上,您还需要以本地用户而不是域用户身份登录(或使用 RunAs 启动 VS)。

我一直不明白为什么这需要如此困难,因为非托管调试要容易得多,并且必须暴露托管调试可能存在的每个安全漏洞。

I seem to remember that I have sometimes found it useful to use RunAs when you run msvcmon (or whatever it's called this week - the remote debugging stub anyway), to force it to start as the user which you have set up to be the same on both machines.

I would guess that on the machine you're running VS on, you will also need to log in as the local user rather than a domain user (or start VS with RunAs).

I have never understood why this needed to be so hard, given that unmanaged debugging is so much easier, and must expose every security hole that managed debugging could.

夏尔 2024-07-12 18:34:26

Gregg Miskely 有一篇关于此的博客文章。 如果两个本地帐户具有相同的用户名和密码,您可能会得到它的工作。 您还可以尝试将您的好盒子从其域中删除,以便您从一个工作组转到一个域,而不是从一个域转到另一个域。

Gregg Miskely has a blog post on this. You might get it to work if both local accounts have the same user name and password. You might also try dropping your good box from it's domain so that you are going from a workgroup to a domain rather than domain to domain.

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