Restrict TFS to only allow connections from clients with VS SP1
You are running TFS 2010 SP1 and want to make sure that all clients have (VS) SP1 (at minimum) applied.
Luckily, you can configure which clients get rejected when trying to connect to your TFS. You can even provide the message that will be displayed to users whose clients get rejected:
It's easy, you have to add two values to the TFS registry (and restart TFS):
- Key: /Configuration/Application/DisabledUserAgents/TFS10SP1
Value: "Team Foundation (*.exe, 10.0.<40219.1)"
- Key: /Configuration/Application/DisabledUserAgents/TFS10SP1/Message
Value: "Sorry, you have to install Visual Studio 2010 Service Pack 1."
How to do that
Use the tfsreg.exe tool and run this two commands:
tfsreg.exe /server:http://servername:8080/tfs /path:/Configuration/Application/DisabledUserAgents/TFS10SP1 /value:"Team Foundation (*.exe, 10.0.<40219.1)"
tfsreg.exe /server:http://servername:8080/tfs /path:/Configuration/Application/DisabledUserAgents/TFS10SP1/Message /value:"Sorry, you have to install Visual Studio 2010 Service Pack 1."
Note: Replace the blue URI with your TFS' server URI.
Or download the ready-to-use BlockNonSP1Clients.bat (.ZIP)
Caution: Always remember do not directly edit the TFS registry entries by editing TFS' SQL databases manually. Always use the registry service (client or server) or the tfsreg.exe tool mentioned above (which does that) to modify TFS registry entries.
Future Compatibility Note: This mechanism might change or be implemented differently in future versions of TFS, there's no compatibility guarantee.
Update (2 Oct 2011): In TFS 2010 older clients (VS 2005 and VS 2008) that do not have Service Pack 1 and the appropriate Forward Compatibility Upgrade installed, will be rejected by default using this technique.
(Thanks to Philip Kelley, Taylor Lafrinere, and Buck Hodges from Microsoft for this tip).