I stumbled across a quirky issue today which was causing scheduled TFSBuild jobs to fail with the following error: “Unable to read data from the transport connection: An existing connection was forcibly closed by the remote hostâ€. When executing the build definition manually I could not reproduce the issue; the build would run through without any errors.
After a bit of searching it turns out there is a small bug in IIS 7.5 (introduced in Windows Server 2008 R2) which prevents TFS downloading files larger than 2MB over a slow network connection; IIS will expire the idle connection time-out and disconnect mid-transfer.
Image may be NSFW.
Clik here to view.
Installing KB981898 from Microsoft Support will fix this bug and allow TFS builds to run-through without any issues.
-Patrick