Team Foundation Server Client and Proxies

If you use Team Explorer (or the TFS client components) and have to configure to connect using a proxy, you might find yourself a little stumped. 

Fortunately for us former Readify and current Microsoft TFS guru Grant Holliday provides excellent insight into how to solve this problem, via Stack Overflow.

If you just want to configure your client to use a proxy server, there is no property to do this. You have to set a registry key or an undocumented environment variable.

For TFS2008 clients, the registry key is: [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\Proxy]
"Enabled"="True"
"Url"="http://someproxy:8081"

For TFS2010 clients, the registry key is: [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\TeamFoundation\SourceControl\Proxy]
"Enabled"="True"
"Url"="http://someproxy:8081"

In either TFS version, you can set the undocumented environment variable:

System.Environment.
SetEnvironmentVariable("TFSPROXY",http://someproxy:8081);

Here’s Grant’s original answer on Stack Overflow (up vote if it helped you!).

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.