I was trying to connect to a TFS server in another domain, but without success. I could connect to the TFS web services through FireFox after providing the correct credentials, but Visual Studio was simply failing with a TF31002: Unable to connect to this Team foundation Server: tfs.


I wasn’t being prompted for alternate credentials when using Visual Studio, only when navigating to the TFS server (http://tfs:8080/services/v1.0/ServerStatus.asmx) through FireFox. Navigating to a network share (\\tfs) also prompted me for credentials and allowed me to see the shares. Only Visual Studio wasn’t prompting for credentials. I decided to try IE7 and received a 502: Bad Gateway error. Ah ha! A lead. Tools… Internet Options… Connections… LAN settings… Uncheck “Automatically detect settings”… OK… OK… Refresh IE and I’m prompted for credentials and can see the server status page. Woohoo! Now let’s try adding the TFS server again in Visual Studio:


Click OK and the moment of truth…


We have a credential prompt!!! Type in correct credentials for the other domain and…


Houston, the eagle has landed! Looks like automatic proxy detection somehow prevents IE and Visual Studio from connecting to TFS successfully. I would like to point out that “Automatic proxy detection is enabled” was not listed amongst the possible reasons for failure in the TF31002 error. Go figure.