Contact

admin

About Me · Send mail to the author(s) E-mail · Twitter

At GROSSWEBER we practice what we preach. We offer trainings for modern software technologies like Behavior Driven Development, Clean Code and Git. Our staff is fluent in a variety of languages, including English.

Feed Icon

Tags

Open Source Projects

Archives

Blogs of friends

Now playing [?]

  1. Marius Müller-Westernhagen – Willenlos
  2. Tiamat – Love In Chains
  3. Tiamat – Wings Of Heaven
  4. Tiamat – Too Far Gone
  5. Tiamat – I Am In Love With Myself
Audioscrobbler/Last.fm

ClustrMap

Reconfiguring Team Foundation Server URLs

Posted in Visual Studio at Wednesday, February 06, 2008 8:15 PM W. Europe Standard Time

Microsoft's solution to integrated software project management, the Team Foundation Server product, offers a lot of services. Beyond Source Control they have a work item tracking, build services and reporting in stock (I suspect there is even more functionality under the hood). You might be tempted to think that such an "all-in-one" solution can become complex to manage pretty soon. Let me tell you, it does! A couple of months ago I set up a Team Foundation Server (beta 2) for a project some friends of mine do for Microsoft (you will hear of it, I promise).

The server was initially installed as a virtual machine on our pretty decent server connected to the DSL line at home. The installation alone took me a week to complete since there was a bug in some XML file that made Visual Studio 2005 misinterpret the file's contents. (I don't remember exactly the source of the problem.) It was quite a hassle to get my first TFS project created.

The project hosted on that server went well, but it became pretty soon obvious that the team needed more resources in respect to bandwidth and virtual machines for testing the application they build. That's something we could not handle with our 640 kbit/s upload bandwidth and 1,5 GBs of RAM in the server. We moved the TFS virtual machine to another physical machine (more RAM) and hooked it up to the University network (lots of free bandwidth).

After moving the server we found that new projects could not be created due to one misconfigured Team System service URL, i. e. that service could be accessed on the home network (think http://tfs/) but not over the Internet. Specifically it was the URL to the SharePoint Central Administration Web Site, but that doesn't actually matter. I checked TFS' Registration Service to see if the corrected URL has been applied. The Registration Service URL looks like this:

http://<TFS Server>:<Port>/Services/v1.0/Registration.asmx

Registration Service

The WssAdminService has a publicy known URL. Good to go! I tried creating a new project, but received that same error as before.

Project Creation Failed

The error message above is a bit misleading because the Team Foundation Client did not try to connect to tfs.therightstuff.de, but rather to the (old) tfs server, as Fiddler revealed.

Team Foundation Client Connects To The Wrong URL

Looking through the other HTTP requests originating from Visual Studio's Team Foundation Client I found that the Registration Service has never been queried to get the updated service URLs. On Buck Hodges' blog I found a hint:

When a client app, such as tf.exe, VS, or your own custom application, needs to use version control, the TF client code must request the service definition from registration service on the server.  To avoid constantly requesting service registration information that rarely changes, the client-side registration code maintains a cache and only makes the server call when the cache is out of date.

Whatever it means that the client re-requests that piece of information when it's out of date. On my machine the Team Foundation cache mentioned above is located at the folder

C:\Users\<User name>\AppData\Local\Microsoft\Team Foundation\2.0\Cache\

I wiped the cache folder and, just to make sure, I also deleted the TFS server registration in Visual Studio.

After re-adding the TFS server in Visual Studio I can now create new Team Foundation projects. Wow!

Now Playing [?]: The Cinematic OrchestraHorizonOregon

Tuesday, February 26, 2008 7:00:01 PM (W. Europe Standard Time, UTC+01:00)
Excellent post. Do you know of any step-by-step guide on setting up TFS on a DSL connection? From your entry, you have obviously figured this all out. Did you use any reference material to get there? I've managed to get TFS installed in a workgroup configuration, but I would like to now make this publicly available through a DSL line and possibly a high-bandwidth, dedicated line in the future.
Jon Peacock
Tuesday, February 26, 2008 7:21:52 PM (W. Europe Standard Time, UTC+01:00)
Jon, as far as I can see there are no big extra steps to take when configuring TFS on a DSL line. All I can think of is setting up port mappings on the DSL NAT device and tell TFS to use URLs with publicy known DNS names and ports according to the mappings.

You can check and reconfigure your public URLs with TFSAdminUtil ConfigureConnections.

However, the server mentioned in the post is not for public use (no guest access), so you might want to look into TFSSecurity and set up read permissions for anonymous users. I never touched that, so YMMV.

Setting up servers on a DSL line with changing IP addresses is a different story, but easy. We use the free dyndns.com service (up to five domains) and their free IP address updater along with a DNS server that maps a "good looking" URL like tfs.therightstuff.de to the dyndns host name through a CNAME record.
Friday, January 23, 2009 6:47:01 AM (W. Europe Standard Time, UTC+01:00)
Why would anyone build a product like TFS and not allow you at installation time to enter in the URL you want to use for everything. WTF WHAT A POS!
Tuesday, August 31, 2010 1:35:17 PM (W. Europe Daylight Time, UTC+02:00)
Thanks, man! That really saved my day. I've wasted about 3 hours trying to find, why TFS keeps failing when I switched from HOSTS-based name to IP address using proxy.
All comments require the approval of the site owner before being displayed.
(will show your gravatar icon)
 
[Captcha]Enter the code shown (prevents robots):

Live Comment Preview