跨域远程调试
我在两个不同的域中有两台机器。 我在两者上都安装了 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
该博客文章并不完全清楚这是否可行,但我能够将 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 domainDOMAIN
. I'm logged in and running Visual Studio asDOMAIN\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
(onPHYSICAL
) andVIRTUAL\employee
(onVIRTUAL
). They both must be Administrators and have the same password asDOMAIN\employee
.The remote debugger and the process to debug must be run on
VIRTUAL
while logged in asVIRTUAL\employee
. Then onPHYSICAL
while logged in asDOMAIN\employee
I can use "Attach to Process..." and connect toVIRTUAL
to get a process list.我似乎记得,有时我发现在运行 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.
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.