Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET remote debugging as another user from another domain?

I am trying to debug remotely via Visual Studio 2010. But I am unable to tell the debugger to use another (remote) account on the remote machine. (Not to use my account.)

Any hints?

UPDATE: I don't have the remote account on my computer (it is in another domain). So I cannot use runas.

like image 517
TN. Avatar asked Oct 26 '11 15:10

TN.


People also ask

How do I debug an IIS remote?

Select Configure remote debugging to configure the firewall and start the remote debugger. When configuration is complete, the Remote Debugger window appears. The remote debugger is now waiting for a connection. Use the server name and port number shown to set the remote connection configuration in Visual Studio.


2 Answers

Been fighting with this for a long time.

Check that

  1. Both computers are in the same domain OR both VS remote debugger and client VS are running as a same user with identical password. Your users can be in different domains or workgroups but login name must be identical
  2. Unrestricted direct connection between machines in both direction is required.
like image 116
Ivan G. Avatar answered Oct 03 '22 21:10

Ivan G.


In my experience remote debug is a pain to set up! Here's how I do it (similar to replies you've already had):

  1. On the remote box, create a local admin user with the same username and password as your domain account. Make sure this local user is part of the debugging group.
  2. On your local box, share the remote debug folder in VS (...\common7\ide\remote debugger)
  3. On the remote box, create a shortcut to the msvsmon.exe file in the share created on your local box.
  4. On the remote box, run the shortcut so remote debugger starts. This guarantees you are running the correct remote debug version.
  5. From visual studio try connecting to the remote machine with User@machine_name, where User is the username of the logged in user on the remote box (not the local admin account you created).
  6. You should see the remote debugger register the connection.

If this doesn't work you may have further networking or permissions problems.

Hope that helps!

like image 38
Philtron Avatar answered Oct 03 '22 22:10

Philtron