Developer Support Team Foundation Server

Tips, tricks, thoughts and experiences from the Microsoft Team Foundation Server global support team.

VS2013 \ TFS "Key not valid for use in specified state" error

VS2013 \ TFS "Key not valid for use in specified state" error

Rate This
  • Comments 25

My VS 2013 would not connect to any internal or VSO TFS instances today. I also could not remove servers (??). I kept getting "Key not valid for use in specified state", not matter what I tried. This was particularly frustrating because VS 2012 on the same machine was connecting to everything just fine!

I exited VS and deleted %APPDATA%\Microsoft\VisualStudio\12.0 and %APPDATA%\Microsoft\Team Foundation\5.0 but that did not fix it. After some digging I found someone on Connect had reported same and for them deleting the 'HKEY_CURRENT_USER\Software\Microsoft\VSCommon\12.0\ClientServices\TokenStorage' folder got it working again. Sure enough, it fixed me too.

HTH if you find yourself in the same state someday.

--Trev

  • Thanks for sharing this,

    saved me a day :)

  • Thanks you. :)

  • Thanks, solved this issue for me.

    After you delete the key from regedit, (even without closing and opening VS instance) when you try to connect to tfs you are required to provide credentials and works fine.

  • Thx a lot...

    But do you have any explanation?

  • Sweet.

  • Same, sold what was 4 hours of messing with settings in about 10 seconds! :-)

  • That fixed it up for us. Thanks.

  • Jap, it works. Thx!

  • Thanks, this really saved my time.

  • Gratz!

  • Worked like a charm!  Thanks!

  • Thanks! It works!!

  • Thank you ! Great post !

  • It works. Thanks

  • Thanks!

Page 1 of 2 (25 items) 12
Leave a Comment
  • Please add 2 and 5 and type the answer here:
  • Post