Remote debugging by domain

I have two cars in two different domains. I installed VS 2005 on both. I need remote debugging between them. Without authentication, this is possible, but I want to debug managed code. I do not want to debug directly, as this is really a crappy machine.

When I try to connect using the debugger, I get the message "Could not establish trust between this workstation and the primary domain." Any idea how to overcome this? I tried tricks with adding the same local username on both machines, but no luck.

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

+4
source share
3 answers

Gregg Bowl has a blog post about this. You can make it work if both local accounts have the same username and password. You can also try to abandon your good box from this domain in order to switch from a workgroup to a domain, not a domain.

+5
source

I seem to remember that sometimes it was useful for me to use RunAs when starting msvcmon (or what he called this week - a remote debugging stub anyway) to make it run as the user you configured to be the same on both cars.

I would suggest that on the machine you are running VS, you will also need to log in as a local user and not a domain user (or run VS using RunAs).

I never understood why this should be so difficult, given that unmanaged debugging is much easier and should open all the security holes that debugs could do.

+1
source

The blog was not completely clear that this would work, but I was able to run Visual Studio as a domain account and still debug the process on a computer that was not in the domain.

I have a PHYSICAL physical development machine in the DOMAIN Active Directory domain. I logged in and ran Visual Studio as DOMAIN\employee .

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

According to a blog post, create local accounts PHYSICAL\employee (on PHYSICAL ) and VIRTUAL\employee (on VIRTUAL ). Both of them must be administrators and have the same password as DOMAIN\employee .

The remote debugger and debugging process must be running on VIRTUAL , logged in as VIRTUAL\employee . Then on PHYSICAL , while logging in to DOMAIN\employee I can use "Attach to Process ..." and connect to VIRTUAL to get a list of processes.

0
source

Source: https://habr.com/ru/post/1276447/


All Articles