How To Fix: “Unable to attach. The binding handle is invalid” Visual Studio Error


microsoftvisualstudioWhen you try to debug a solution in Visual Studio, you may get an error “Unable to attach. The binding handle is invalid”. This error does not stop you from running the solution, but it will not allow you to debug the code and none of breakpoints will stop the code execution. A kind of annoying situation for developers.


Visual Studio shows this error message when the Windows Service Terminal Services is disabled or stopped. To resolve the issue all you need to do is to start the Windows Service and to avoid the same problem in future ,set start-up type of the service to Automatic. You can start the services by following these instructions

  1. Open Run Command box by pressing Windows + R keys.
  2. Execute the command Services.msc. Opens up Windows Services window.
  3. Search for the service “Terminal Services” and start the service
  4. Also set start up type to Automatic

I tested this solution on Windows XP with Visual Studio 2005 and worked fine. Hope this helps you.

Leave a Comment

Your email address will not be published. Required fields are marked *