Hosting Team Foundation Server on a fully qualified domain name (FQDN)
This blog describes how you can setup your Team Foundation Server environment using a FQDN. For a full explanation about what a FQDN is, you can read my previous post about Hosting Reporting Services on a fully qualified domain name (FQDN). Since TFS is based on Reporting Services, as well on WSS it's also advisable to read my last post about Hosting SharePoint on a fully qualified domain name (FQDN).
For this example I will modify the host file to use sharepoint.mikeglaser.com for SharePoint and Reporting Services and teamfoundation.mikeglaser.com for TFS as a FQDN. On Windows-based computers, this file can be found in the systemroot\System32\Drivers\Etc folder. Trough Microsoft Internet Information Services (IIS) you configure the sites, so their only accessible through sharepoint.mikeglaser.com and teamfoundation.mikeglaser.com. This can be done by changing the default identification and adding the FQDN as a host header value.
As you can see in the picture I'm using WSS V3 for TFS. How to setup a configuration like this, you can read on my blog in the Upgrade TFS V1 to WSS 3.0 Guide.
After configuring SharePoint and Reporting Services to use a FQDN it's now time to configure TFS. To use TFS with the newly created host header names, there are several steps to fulfill.
Step 1 Configure Team Foundation Server to use a FQDN SharePoint Server
Microsoft wrote an excellent article about setting up a Remote SharePoint Server. In my case it doesn't have to be a remote server, but just a server with a FQDN. Besides this I don't like TFSReg, it's to complex for such a simple job. Instead a hack my way in SQL Server directly. The table tbl_service_interface of the TfsIntegration database to be precise. I'll change all URL's to use sharepoint.mikeglaser.com instead of the name of mine server.

Warning: WSSAdminService is a separate Web Site and doesn't have to have the same FQDN as the SharePoint Web Site.
Step 2 Fix the Reporting Web parts and lists on the Team Foundation Server portal sites
TFS adds an aspx file (tfsredirect.aspx) to the layouts folder of WSS which can be found in %Program Files%\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS or %Program Files%\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS, depending on which version of WSS you're running. This file request the registry where the Report Server can be found. Open the registry and browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\TeamFoundation\ReportServer hive. Change the content of 'key' to use your FQDN of Reporting Services.
Step 3 Modify web.config of Team Foundation Server
Before each services on TFS starts it check the web.config of the root website on which URL TFS is running. A strange way to build a config like this, because each services is running on the TFS web site. Either way open the web.config of TFS, which can be found in %Program Files%\Microsoft Visual Studio 2005 Team Foundation Server\Web Services. Change the TFSNameUrl key and use your FQDN (e.g. http://teamfoundation.mikeglaser.com:8080) instead.
Step 4 Clear Team Foundation client cache
Before opening Team Explorer, make sure you clean the cache of it. Else you can't connect to the new FQDN environment and red cross marks will appear in your Documents and Reports sections.
Open the local settings from the current user. Within the application data of Microsoft open the Team Foundation folder and clear the cache in 1.0 folder. To do so, just remove the cache folder or the folder beneath it.
Step 5 Open your Team Explorer and connect to the new Team Foundation Server
Add the new FQDN (e.g. teamfoundation.mikeglaser.com) to the list of servers and connect to your preferred team project. Make sure all sections are connecting to a new FQDN site.
Summary
As you can see again it's not that hard to use a FQDN with Team Foundation Server, but you gotta know how. As I hope to show you in my last couple of posts, it's easy and advisable to setup FDQN's for your environments. This way you can easily add lots of web site and applications on machine only. Besides you don't have to setup IIS environments all over the place.
Technorati tags: TFS, Team Foundation Server