Changing the Web Service Port for TFS

One of the challenges associated with installing Team Foundation Server in the real world is the hard-coding of some of the ports. Not hard-coding, per se, but the inability to easily modify the assigned ports during the installation process. For example, at the company where I just performed the installation, port 8080 was already being used by some RAID monitoring software. So while the installation process was doing its system check, it balked because port 8080 was already being used. Is there any way to change this during the installation dialog? No. It might be possible to change the msiproperty.ini file, but according to an MSDN Forum post, there are known issues with doing so. So we killed the RAID monitoring process and performed the install on 8080.

But now I was faced with the need to change the port after the fact. Because, after all, it was much more difficult to change the RAID monitoring software. And should brand new software be able to cope? As it turns out, it can. There are only two steps needed to change the port on a running system. At least two that I’ve seen so far and I’ve been able to connect to TFS, create projects and modify security. If there are other gotchas, I don’t know what they are. The steps are:

1. Change the port that is being listened to by IIS. This is done through the Internet Information Systems Manager. If you right-click on the Team Foundation Server web site and select Properties, the port number is on the Web Site tab. When finished with this change, make sure that you restart IIS.

2. In the installation directory for TFS, there is a Web Services directory. In that directory, there is a web.config file. The web.config file has an element named TFSNameUrl. This is the URL, complete with port number, for the web service. Change the port number to reflect the change that you made to IIS.

These two changes were all that I’ve seen in the way of requirements, but if someone runs into trouble, let me know and I’ll take a look.