This is really an expansion on a previous post about remote debugging.  I came across a surprising scenario causing major headaches when remote debugging.

The basic truth is that no matter what, you really want two local user accounts, one on host and remote host, with the same username and password.  This is a fact, as MSDN says so.  The real trick is to have Visual Studio authenticate using a local account that matches a remote account (username and password)  that has been given permissions to debug in msvsmon.exe

Sounds fairly straight forward right?  Now introduce Windows cached credentials.  When you access a resource and check “remember me”, you’re allowing Windows to cache credentials to that resource.  Now if you ever attempt to Attach To Process using the current user logged into the local machine, Visual Studio will pick up these cached credentials and attempt to use this as authentication for remote debugging.

If you don’t want this behavior to happen, you’ll need to clear these credentials.

1. Run: control userpasswords2

2. Advanced tab, Manage Passwords

3. Delete the credentials for that remote host.

image

 

At this point you can either attempt accessed the resource (like a share) using a different credential and store it, or you can run Visual Studio as that user you want to debug with that corresponds to the user on the remote side.

References

Setting up Remote Debugging: http://msdn.microsoft.com/en-us/library/bt727f1t.aspx
Windows Vista Security Model: http://msdn.microsoft.com/en-us/library/bb385791.aspx

About these ads