TFS Build Agent Unreachable

Today when I kicked off a TFS build I got an error:

TF215085: An error occurred while connecting to agent \#####\##BuildAgent: TF215076: Team Foundation Build on computer wd201a013v (port 9191) is not responding. (Detail Message: Unable to connect to the remote server).

The steps I took to resolve it.

1. Check if 9191 is added in the windows firewall exception list on the build machine. Control Panel > Windows Firewall. If not add an explicit rule to allow the port (9191 is default)

2. Check if Visual Studio Team Foundation Build service is running. Run > Services.msc > locate service if it running. If not start it. Visual Studio Team Foundation Build is the build service for Visual Studio Team Foundation 2008. If the service doesn’t start check the logon credentials. Make sure it is a valid Domain account or Workgroup account.

Problem Solved.

Pragma no-cache

I had a requirement where an aspx page should not be cached in the Temporary Internet Files, simply because we want to reload the page from the server each time. This sort of scenario may present when login or authenticating. Some research and I found this article http://support.microsoft.com/kb/222064.

I was writing code in .Net and luckily its even simpler. Simply add this to the Page_Load

Response.Cache.SetCacheability(HttpCacheability.NoCache);
 Response.AddHeader(“Pragma”, “no-cache”);