How to set up a quick HTTPS connection to Team Foundation Server version control
Posted: (EET/GMT+2)
A quick tip for those of you wishing to quickly connect to your TFS server through a secured HTTPS connection: to allow Visual Studio to successfully connect to your TFS server with a self-signed certificate, you will need to first install the certificate to your Internet Explorer's (IE) digital certificate store on each computer you will be using the HTTPS connection with.
A little more elaborate version. The communication between TFS server and your Visual Studio client happens through the HTTP protocol, which can be easily secured with HTTPS. Furthermore, HTTPS for your TFS server is easy to enable in IIS settings, but unless you have purchased a valid, verified certificate for around $500 or more, you must use a self-signed certificate. As far as the transferred TCP/IP packets are concerned, the data is in just as safe hands with either of these certificates.
However, the problem is that Visual Studio will not let you connect through HTTPS to a TFS server, unless you have indicated you trust the certificate. If you try this, you will get an error message saying:
TF31002: Unable to connect to this Team Foundation Server: https://192.168.0.10:8081/tfs. ... Technical information (for administrator): The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
Adding the certificate and marking it trusted is done using IE's settings. Browse normally to your TFS server, and then open the properties for the certificate from the address bar. Then, install the certificate (for details, see here) and you are set. Restart Visual Studio, and create your connection.
Now you have a working HTTPS connection to your TFS server. This works well in small environments, larger environment probably want tighter security and easier management. See here for details on an MSDN walkthrough article.
Good luck!