Team Foundation Server touches many technologies. One primary technology is Internet Information Services, usually referred to as IIS.
Making TFS configuration changes sometimes involves reconfiguring IIS using the Internet Information Services (IIS) Manager, or ISS Manager. It is common to apply the changes by executing the IISRESET command at a command prompt. Occasionally under IIS 6.0, the changes made in IIS Manager don’t “stick”, but revert to their old values after the IISRESET.
There is a simple explanation for this. In IIS 6.0, changes made through the IIS Manager MMC interface are made to the running instance of the IIS Admin Service in memory. These are not written to the IIS Metabase until the IIS Admin Service is stopped, and become effective when the service is restarted.
The IIS Admin Service must be shut down in an orderly manner for any changes to be saved. IISRESET, by default, will terminate the associated processes (including the IIS Admin Service) if it cannot close them in an orderly fashion within 20 seconds. That causes any configuration changes to be lost if IIS can’t be shut down in the 20 second window.
The workaround is to cycle the IIS Admin Service, rather than using IISRESET, to apply any changes.
Here is how:
1. Open a Command Prompt window, click Start then Run, enter cmd in the Open box, then click OK.
2. Once you are certain it is an acceptable time to restart your TFS web site, execute this command:
C:\WINDOWS\System32>net stop iisadmin /y
You will receive this output:
The following services are dependent on the IIS Admin Service service.
Stopping the IIS Admin Service service will also stop these services.
World Wide Web Publishing Service
The World Wide Web Publishing Service service is stopping.
The World Wide Web Publishing Service service was stopped successfully.
The HTTP SSL service is stopping.
The HTTP SSL service was stopped successfully.
The IIS Admin Service service is stopping.
The IIS Admin Service service was stopped successfully.
Depending on your IIS configuration, there may be other services that stop as well.
3. To restart IIS, execute the following command:
C:\WINDOWS\System32>net start "World Wide Web Publishing Service"
You will receive output like this:
The World Wide Web Publishing Service service is starting.
The World Wide Web Publishing Service service was started successfully.
4. Since the HTTP SSL service was also stopped, let’s restart that also:
C:\WINDOWS\System32>net start "HTTP SSL"
Here, we get this output:
The requested service has already been started.
The above behavior occurs because the World Wide Web Publishing Service has a dependency on the HTTP SSL and IIS Admin Service, so HTTP SSL and IIS Admin Service are started automatically when the World Wide Web Publishing Service is started. Be sure that you restart any other services that were stopped when you stopped the IIS Admin Service.
For further details, see Microsoft Knowledge Base 286196 article “IISReset May Not Save IIS Configuration Changes” at http://support.microsoft.com/kb/286196.
Note: these instructions apply to IIS 6.0 running under Windows Server 2003. This behavior does not occur in IIS 7.0 under Windows Server 2008.
Hopefully this clears some of the confusion!