Vs 2005 remote debugging - visual-studio-2005

i am unable to connect to visual studio remote debugger when it is running as windows service
I am getting this error
"Unable to connect to the Microsoft Remote Debugging Monitor named 'MyUsername#192.168.99.61' Logon failure: unknown user name or bad password"
but when i run the remote debugger through startup menu it work fine.
how to fix this?
Abdul khaliq

You are trying to connect to "MyUsername", by default, services run under "localservice". Check which user your service is running as.
Also, remote debugging requires that both the local and remote users have admin priviledges on both computers. the "localservice" user probably won't have the required permissions.

Related

Running msvsmon as a service in "no authentication" mode

I am trying to debug a process written in C++ that gets launched prior to user logon in a virtual machine. The VM is a member of a test domain. My dev machine is not domain-joined, so I can only use Msvsmon in no authentication mode.
I have often used no authentication mode successfully when running Msvsmon interactively. Now I am running it as a service, and when I try to connect from VS2010 I get a message saying:
Unable to connect to '192.168.56.128'. The Microsoft Visual Studio Remote Debugging Monitor is either not running on the remote machine or is running in Windows authentication mode.
How can I debug the remote process in this situation? I am open to other suggestions than running Msvsmon as a service.

Attach to Remote C++ Process with Visual Studio 2010

I have a c++ program running on a remote machine.
I'd like to debug it from my machine.
I've installed remote debugging services (msvsmon.exe ) on the server.
Firewalls are not active not in the client nor in the server.
The program is running on the server (.pdb file is also there).
In the client I open the project in VS2010 , I go to debug->attach to process.
In the qualifier field I copy the value of the server name in msvsmon.exe.
When I hit enter, I get an error prompt saying :
"Unable to connect to Microsoft Visual Studio Remote Debugging Monitor named Administrator#TESTER1, the requested name is valid, but no data of the requested type was found"
In the server, the Authentication mode in msvsmon.exe is set to Windows Authentication.
Any help will be much appreciated.
Regards,
Omer.
Take a look at:
How to: Set Up Remote Debugging from Microsoft
Remote debugging with Visual Studio 2010 from CodeProject
In your case, take note of the suggestions regarding native debugging and windows authentication.
In my experiences with remote debugging a machine that is on my local network, I bypass windows authentication and setup the remote msvsmon.exe to allow anyone to connect to port 4015. So, then in the 'Attach to Process' dialog I select Transport > Remote (Native only with no authentication) and for the Qualifier I enter TESTER1:4015 or TheIPAddress:4015 if the name of the PC cannot be resolved.

Remote Debugging in VS2010 - access denied

I have VS2010 on my dev machine (Win7) and I run a virtual machine under XP SP3 (name PC), on which I installed the VS2010 remote debugger, as well as .Net Framework 4.
On both OS I have the same user name (User), with the same password, with admin privilege, who is allowed to debug programs (Local Policy/User Rights Assignment/Debug programs). The firewall is deactivated on both.
When I debug my program through VS2010 (specifying "Start external program" and "Use remote machine"), I get
Error while trying to run project: Unable to start debugging.
Access is denied. Can not connect to Microsoft Visual Studio Remote
Debugging Monitor on the remote computer.
On the VM the Visual Studio Remote Debugging Monitor displays a line saying "PC\User connected".
If I try to attach a process using "Default" as transport and "User#PC" as qualifier, I get a similar error
Unable to connect to the Microsoft Visual Studio Remote Debugging
Monitor named 'User#PC'. Access is denied. Can not connect to
Microsoft Visual Studio Remote Debugging Monitor on the remote
computer.
Again on the VM the Visual Studio Remote Debugging Monitor displays a line saying "PC\User connected".
If I try to attach a process using "Remote (Native only with no authentication)" as transport and "PC:4015" as qualifier (changing the "Authentication mode" to "No Authentication (native only)", then it works and I see all the available processes on the VM.
Any idea on why the access is denied even if the Visual Studio Remote Debugging Monitor seems to accept the connection? Also if I 1st use "Windows Authentication" and try to start the debugger, and then I try to change the "Authentication mode" to "No Authentication", I get
Your new options can not be applied. Cannot stop server because one or
more users are currently connected.
View Msvsmon's help for more information.
I was eventually able to make it work by doing "Run as administrator" on VS.Net 2010 (I forgot that Windows 2008 and 7 are quite different when it comes to right management).

Connecting to VS2010 Remote Debugger from a domain?

I'm trying to set up a remote debugger connection from my dev box on a domain to a web server (SERVER) in a workgroup with no success and I'm hoping for the some insight.
---------------------------
Microsoft Visual Studio
---------------------------
Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor
named 'SERVER'. The Microsoft Visual Studio Remote Debugging Monitor
(MSVSMON.EXE) does not appear to be running on the remote computer. Please see
Help for assistance.
At this point, I have done the following:
I've installed the x64 debugging components, but not as a service. The monitor is up and running.
I've created an account on the workgroup machine to match my domain account in name and password.
I've granted this account the "Debug programs" right in Local Security Policy.
I've added this account the "Administrators" group.
Still I get the same error message.
Any suggestions?
You also need to create a local account on your dev box with the same name and password as your domain account.
This account just needs to exist - you don't need to run VS with it.

Remote Debugging: Target computer cannot connect back to this computer. Authentication Failed

I am trying to set up remote debugging from my development machine into a production environment running in a virtual machine, but no matter what I do I get the following error:
Unable to connect to the Microsoft
Visual Studio Remote Debugging Monitor
named . The
Visual Studio Remote Debugger on the
target computer cannot connect back to
this computer. Authentication failed.
Please see Help for assistance.
This is my setup:
Host Machine:
Windows 7 Professional x86
Visual Studio 2010 Ultimate
Virtual Machine:
Windows 7 Professional x86
Both computers are on the same domain, with the same username and password. The firewall on the remote computer is turned off and the firewall on the host is on, but turning it off produces the same error. The accounts on both machines are members of the Administrators group and running both msvsmon and visual studio as administrator or either/or produces the same result. When I put the server name in the qualifier field in "attach to process" and click refresh, I can see the log on the remote machine saying that the host is connected but that is followed immediately by the above error. Lastly, and this may be the most important piece of information, when the authentication fails, I get an entry in the even log that states that a user account was locked out:
A user account was locked out.
Subject:
Security ID: SYSTEM
Account Name: MyHostComputerName$
Account Domain:
DomainWhichBothMachinesAreOn
Logon ID: 0x3e7
Account that was locked out:
Security ID:
MyHostComputerName \ MyUsername
*(which is identical on both machines)* Account Name:
MyUserName
Additional Information:
Caller
Computer Name: MyVirtualMachineName
I have read seemingly every tutorial, help ticket and random bit of information regarding this problem and remote debugging in general and tried just about every "quick fix". I would be very appreciative of any ideas. I can provide any additional information if needed. Thanks in advance.
"MyHostComputerName \ MyUsername" seems to indicate the VM service is trying to authenticate with a local user, not the domain user
have you created the same user & password as local accounts on both systems?
http://msdn.microsoft.com/en-us/library/ms164725.aspx
I had this same problem running VS 2010 Pro on Windows 7 Pro accessing Remote Debugger 2010 on Windows 2008 R2. I had created identical accounts on the server running the debugger and on my domain. I was running under my identical accounts both visual studio and remote debugger with administrator rights and with the firewall turned off. on both systems.
the error I got was "... the visual studio remote debugger on the target computer cannot connect back to this computer ..." I found this issue with both VS 2010 and VS 2005 so I knew it was an issue with my system
SOLUTION - add a local user account to your system running visual studio as a domain account won't work (you can run visual studio under the domain account, you just need the local account to be present with admin rights assigned).
I know this answer is for an old thread but there are a number of threads out there on this issue with no solution.
Go to target computer (that you want to debug remotely), open windows explorer and visit computer from which you are debugging. It will prompt for username password. Enter credentials for account that exist on both computers and has relevant permission. After it authenticates you will be able to use remote debugger.
My config was BOTH COMPUTERS IN WORKGROUP.
In my case when adding mu local computers credentials to remote host problem solved.
The credential is the workaround for the case when you have a "domain admin computer with vs studio" machine trying to remote debug a "non domain admin computer" machine from different domains.

Resources