Tuesday, January 27, 2009

TFS31004 - Cannot connect to TFS

I recently had one of my developers tell me they were having trouble connecting to TFS. He had no problems connecting while at work, but then he took his laptop home to do some work. (Before you send me hate-mail, I didn't ask him to work any OT from home.) At home, he was unable to connect to TFS, so he deleted the server from Team Explorer and tried to re-add it. At this point, he got a dialog reporting a TFS31004 error. It's important to note here that his laptop was NOT joined to our domain. I'm happy he came to me early on because I knew I'd seen this error before so it didn't take me too long to find a fix. Scotty Wakefield's blog had a posting with exactly what we were looking for.

On the developer's machine, open a command prompt and enter control keymgr.dll
A dialog titled Stored User Names and Passwords should appear. Find the entry in the listbox matching the name of your TFS server. Click the Edit... button, verify your username, and retype your password. Click OK and then Close to exit the dialog. Try again to connect to TFS.