Reputation: 5050
I try to remote debug C# application (remote PC under WinXP (32bit), VS runs under Win7 (64bit) i got an error message:
Error while trying to run project: Unable to start debugging.
Logon failure: unknown user name or bad password. See help for more information.
On both machines i set-up user accounts with same name/password, and both machines locates on same work group in LAN.
When I enabled login audit on WinXP I see strange record on event log, common sense of this is: login forbidden for user SYSTEM
, but i run VS and remote debug moniton by another user name.
Can somebody explain me how to beat this strange error?
Upd: I tryed to run VS2010 as remote user with command:
runas /user:pc_name\user_name path_to_vs_ide
then pass password. IDE was started succesfully, but when i choose "Attach to process..." and wrote pc_name
in qualifier field, i got same error as above:
Logon failure: unknown user name or bad password.
So my question is still yet actual. How to remotely debug C# applications?
Upd2: Problem solved after install new pure copy of WinXP.
Upvotes: 4
Views: 2084
Reputation: 3076
Alex, you may need to change the Local Security Policy setting on the Windows XP machine, here are more details: http://msdn.microsoft.com/en-us/library/ek2256kk(v=vs.100).aspx
Upvotes: 0
Reputation: 858
You can see more info here on how to set up remote tools: http://msdn.microsoft.com/en-us/library/bt727f1t.aspx Gregg's blog is very useful for account requirements: http://blogs.msdn.com/b/greggm/archive/2008/05/15/visual-studio-remote-debugger-service-user-account-requirements.aspx
You really want two local user accounts, one on host and remote host, with the same username and password (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)
Windows cached credentials - if you accessed a resource and checked “remember me”, Windows cached credentials to that resource. If you ever attempted 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. So you’ll need to clear these credentials (control userpasswords2, Advanced tab, Manage Passwords, Delete the credentials for that remote host)
Now you can either attempt to access 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.
Upvotes: 1
Reputation:
Assume you have two computers, C1 and C2. You create a user Alex on both, and each copy of Alex has the same password. Same user, right?
These are not the same user login. Each has a different unique identifier (UID).
If you try to log in to C1 from C2 using "Alex" as the user name, the user you are using is the Alex from C2, not the Alex from C1, which is the principal the remote system will use to authenticate. But the remote system doesn't know who Alex from C2 is.
Try changing your remote credentials to your equivalent of "C1\Alex": the remote computer name, a \
, and the user name.
Upvotes: 2