The Binding Handle is Invalid in VS 2005 Resolved

I tried to run one of my WinForm 2.0 solution in my home machine tonight, but a confusing error message displayed when I pressed the F5 button: "Unable to attach debugger. The binding handle is invalid"... What's the binding handle in VS2005? I did a quick search on the product feedback site and luckily, I found the resolution at here.

In short, the solution is to start the Terminal Services in Computer Management panel manually.
(Terminal Services hook up with debugger in VS2005?)

Colt Kwong

Published Wednesday, November 16, 2005 10:09 PM by Colt
Filed under:

Comments

# re: The Binding Handle is Invalid in VS 2005 Resolved

I found the solution there too! I'm glad I need to enable Terminal Services to debug my code. (a) you'd think the installer could tell you "terminal services is disabled, you must enable it to do anything useful" and (b) why is terminal service needed?

Karl

Wednesday, November 16, 2005 10:17 AM by karl

# re: The Binding Handle is Invalid in VS 2005 Resolved

I ran into this my first day using 2005 also, wtf does Terminal Services have to do with debugging?

Wednesday, November 16, 2005 11:08 AM by T

# re: The Binding Handle is Invalid in VS 2005 Resolved

I ran into the same thing too. I've never needed Terminal Services on my machine and have always had it disabled (one less intrusion vector). I would like to see an explanation as to why it needs to be enabled.

Wednesday, November 16, 2005 11:25 AM by Brian Scott

# re: The Binding Handle is Invalid in VS 2005 Resolved

Definitely annoying!
Why at least not document this dependency??
I guess all microsofties run terminal service on their desktops? but still hard to imagine that "not a single person" in MS realized that tens of thousands of other developers don't have or don't want to enable TS.

Wednesday, November 23, 2005 3:58 AM by Bill

# re: The Binding Handle is Invalid in VS 2005 Resolved

WTF! Microsoft - come on! This is so ridiculous.

Thursday, December 01, 2005 3:54 PM by Dave

# re: The Binding Handle is Invalid in VS 2005 Resolved

Hey - Thanks so much for finding the resolution!! (like most peeps, I have Term Svcs disabled) You saved me from getting really annoyed and wasting time at on the microsoft site. I really appreciate your sharing your knowledge!

Thursday, December 01, 2005 6:24 PM by Pam

# re: The Binding Handle is Invalid in VS 2005 Resolved

Why on earth would i want to enable the terminal services service on my home pc just so i can debug my web app?

That's a workaround and not the solution surely?

Friday, December 02, 2005 4:16 PM by Gregor Suttie

# re: The Binding Handle is Invalid in VS 2005 Resolved

I tried the solution and it works -- It's an odd solution, but obviously the correct solution.

Monday, December 05, 2005 5:12 AM by Dave

# re: The Binding Handle is Invalid in VS 2005 Resolved

thanks so much for the tip. That did it. Makes no sense (of course) but it did it.

Thursday, December 08, 2005 8:57 PM by srinivas

# re: The Binding Handle is Invalid in VS 2005 Resolved

Thank you ,it works

Sunday, December 11, 2005 3:18 AM by anan

# re: The Binding Handle is Invalid in VS 2005 Resolved

Projects---Projectname Properties--Debug---Disable vs hosting

Sunday, December 11, 2005 3:17 PM by Oz

# re: The Binding Handle is Invalid in VS 2005 Resolved

thanks, only took a minute to fix this problem w/ some help from google

Tuesday, December 13, 2005 12:41 AM by b0x

# re: The Binding Handle is Invalid in VS 2005 Resolved

My Boss always tells me not to mess up with working machines! This is a very good example - last night I went to Services CPL for something else and saw that Terminal Services are running so I Disabled it.

Today morning VS2005 is shouting at me "Binding is invalid"!!

Thank You guys

Wednesday, December 14, 2005 12:28 AM by mnimonic

# re: The Binding Handle is Invalid in VS 2005 Resolved

Thanks Oz. Good solution. I prefer to keep Terminal Services disabed.

Friday, December 16, 2005 2:36 PM by TJS

# re: The Binding Handle is Invalid in VS 2005 Resolved

Thanks!
This page saved me hours.

Friday, December 16, 2005 3:19 PM by ComputerGeek

# re: The Binding Handle is Invalid in VS 2005 Resolved

Quite strange..i too faced this...thanks to this blog..didnt waste much time on it...could solve it pretty fast

Saturday, May 26, 2007 10:53 AM by Suman Perumbully

# re: The Binding Handle is Invalid in VS 2005 Resolved

Thank you... quick & easy resolution to an annoying issue.

Friday, June 01, 2007 11:13 AM by topazi

# re: The Binding Handle is Invalid in VS 2005 Resolved

Absloutely splendid!! it works great.

I was searching for this ten minutes back and here I go.. got the solution. Looks like you guys have done lot of R&D to fix this annoying issue.

Thanks a lot again!!

Tuesday, June 19, 2007 2:33 AM by Kiran Naik

# re: The Binding Handle is Invalid in VS 2005 Resolved

thank you.........

Friday, September 07, 2007 10:53 AM by shebin

# re: The Binding Handle is Invalid in VS 2005 Resolved

i am facing same probmem , my problem is resolved through running terminal service.

thanks a lot.

manoj

Friday, September 14, 2007 2:39 PM by Manoj Mevada

# re: The Binding Handle is Invalid in VS 2005 Resolved

Projects -> [Projectname Properties] -> Debug -> Disable the VS hosting process.

This worked fine.  I didn't have to enable terminal services.  Not sure if I have to do this every time I have a new project yet.

Tuesday, September 18, 2007 1:32 AM by Rook

# re: The Binding Handle is Invalid in VS 2005 Resolved

Thanks so much for your tutorings.

Finally I sloved the problem after upgrading the Visual Studio 2005.

Wednesday, September 19, 2007 8:01 PM by Jeffrey

# re: The Binding Handle is Invalid in VS 2005 Resolved

Thanks for the info

Monday, September 24, 2007 7:49 AM by OMG

# re: The Binding Handle is Invalid in VS 2005 Resolved

My first day with VS and i thought i have already  started running into issues....

thx

Wednesday, September 26, 2007 2:41 PM by umar

# re: The Binding Handle is Invalid in VS 2005 Resolved

Running a Microsoft course (MS2541) with 10 virtual PC images, (all supoposed to be identical, half had TS off half on).  WTF is microsoft doing to us.  Thank goodness for this fix

Monday, October 08, 2007 5:55 AM by tom charnley

# re: The Binding Handle is Invalid in VS 2005 Resolved

thank you

You have solved my problem

Sunday, February 03, 2008 4:26 AM by Tarek Ahmed

# re: The Binding Handle is Invalid in VS 2005 Resolved

This link gives an excellent explanation for the error and why enabling the Terminal Services service is not a security risk.

blogs.msdn.com/.../509243.aspx

Wednesday, March 05, 2008 10:05 AM by Jim Decker

# re: The Binding Handle is Invalid in VS 2005 Resolved

I have enabled the Terminal Services in my machine but it still not working ,

Actually My machine is running on

"Windows Vista" and I am not able to solve the problem with above techniques.

Monday, April 07, 2008 6:40 AM by Navnath Lanke

# re: The Binding Handle is Invalid in VS 2005 Resolved

A lot of thks, was a great help...

Tuesday, May 13, 2008 12:42 PM by Gonzalo Zamalloa

# re: The Binding Handle is Invalid in VS 2005 Resolved

Thanks, it works, but to echo all of the previous comments in the last 2.5 years, why is this the path to fix this issue? Anyone know of a detailed knowledge base article?

The debugging was working without the service enabled up until now.

Tuesday, June 17, 2008 2:21 AM by Website Dude

# re: The Binding Handle is Invalid in VS 2005 Resolved

Thank you very much! It works!

Wednesday, July 09, 2008 3:25 AM by mulya8888

# re: The Binding Handle is Invalid in VS 2005 Resolved

Thanks. Te option of turning on Terminal Services has worked well for me.

Wednesday, July 16, 2008 2:39 AM by Nitesh

# re: The Binding Handle is Invalid in VS 2005 Resolved

Worked great for me too.. Thanks a lot..

Friday, August 29, 2008 6:48 AM by Angel

# re: The Binding Handle is Invalid in VS 2005 Resolved

hai try to change the  my comuter manage / services and Applications services / Terminal and services click propertice set manual

"Error while trying to run project: Unable to start debugging, The binding handle is invalid"

Wednesday, September 10, 2008 1:47 AM by john

# re: The Binding Handle is Invalid in VS 2005 Resolved

thanks very much, this helpd me...

thankQ vry much..

Saturday, September 13, 2008 9:15 AM by Ebby

# re: The Binding Handle is Invalid in VS 2005 Resolved

Thanks so much...saved me a lot of time.

Saturday, November 15, 2008 2:10 AM by Kaushik

# re: The Binding Handle is Invalid in VS 2005 Resolved

I have windows XP professional on my pc.i restarted the terminal services but it is not working in my case.

Pls suggest.Im in urgert help.

Error is:-

"Unable to attach.Binding handle is invalid."

Pls reply me at swati@hondacarindia.com

Monday, November 17, 2008 12:29 AM by swati

# re: The Binding Handle is Invalid in VS 2005 Resolved

Hi Oz,

    Thanks alot for your soluation"Projects---Projectname Properties--Debug---Disable vs hosting"

Monday, November 17, 2008 3:36 AM by Rona Dev

# re: The Binding Handle is Invalid in VS 2005 Resolved

Hi. I tried to follow your instruction which is enable the Terminal service but the problem is not solved. What should i do?

Saturday, November 29, 2008 1:38 PM by Khanh

# re: The Binding Handle is Invalid in VS 2005 Resolved

I found the solution ! Goto <project> and select Project Properties and in debug unckeck the Enable the visual studio hosting process.

Monday, December 01, 2008 11:15 PM by Ranjit

# re: The Binding Handle is Invalid in VS 2005 Resolved

Thanks It worked..

Wednesday, January 21, 2009 9:37 AM by Murlai

# re: The Binding Handle is Invalid in VS 2005 Resolved

thanks a lot my problem has been resolved.

Thursday, June 18, 2009 4:32 AM by vivek

# re: The Binding Handle is Invalid in VS 2005 Resolved

Nice It works Perfectly!Thanks

Tuesday, August 11, 2009 11:41 PM by Gaurav

# re: The Binding Handle is Invalid in VS 2005 Resolved

Wow! Its imposible... I'm realy shocked :/

Sunday, September 06, 2009 9:50 AM by Clothing

# re: The Binding Handle is Invalid in VS 2005 Resolved

Thanks Jim Decker! I always thought that enabling Terminal services would be a security threat.

"blogs.msdn.com/.../509243.aspx"

Sunday, September 20, 2009 7:35 AM by Anderson D'souza

# re: The Binding Handle is Invalid in VS 2005 Resolved

I don't have terminal service in my pc any one please suggest me what to do

Wednesday, September 23, 2009 2:41 PM by chandan

# re: The Binding Handle is Invalid in VS 2005 Resolved

Thanks Colt Kwong,

It worked, now I am able to debug.

Friday, October 02, 2009 9:55 AM by Shripad

# re: The Binding Handle is Invalid in VS 2005 Resolved

Thanks Rook. I was having problem with starting Terminal Services and your solution worked!

Saturday, October 17, 2009 8:24 PM by Lee

Leave a Comment

(required) 
(required) 
(optional)
(required)