Cannot connect on TFS 2012 server through SSL with invalid certificate

apache-2.2team-foundation-serverubuntu-12.04windows-server-2008-r2

I saw the problem on some forums and even here, but not as specific as mine.
So here's the thing,

So I've configured a TFS 2012 server, on one of my personnel server at home, and now, I'm trying to make it available through the internet, with the help of apache2 on a different UNIX based, physical server. The thing is working perfectly, I don't have any problem accessing the address https://tfs.something.com/tfs through my browser. The address can be pinged and I do have access to the TFS control panel through it.

How does it work? Well, with apache2 you can set a virtual host and set up the ProxyPass and ProxyPassReserver setting, so the traffic can externally comes from a secure SSL connection, through a specified domain or sub-domain, but it can be locally redirect on a clear http session on a different port. This is my current setup.

As I already said, I can access the web interface, but when I'm trying to connect with Visual Studio 2012, it can't be done. Here's the error I receive:

Error message

The technical information says: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

My SSL certificate is invalid and was automatically generated on my UNIX server. Even if I try to add it in the Trusted Root Certification Authorities either on my TFS server or on my local workstation, it doesn't work. I still receive the same error.

Is there's a way to completely ignore certificate validation? If not, what's have I done? I mean, I've added the certificate in the trusted root certificates, it should works as mentioned on some forums…

If you need more information, please ask me, I'll be pleased to provide you more.
Dave

Best Answer

If you go to the URL with Internet Explorer you can see if it should work for Visual Studio. If IE opens the site without any certificate warnings then VS should be able to do so as well.

Make sure when you add the certificate to your client machine that you manually select the Trusted Root certificate store; I have found that it doesn't always put it in the right place if you allow it to select the store automatically.

Finally, your certificate must have valid dates and the name must match the URL used. (it is ok to be self-signed since you are going to explicitly trust it.) if either of these are incorrect then neither IE or VS will work as desired.