We just upgraded from TFS 2010 to TFS 2013, but we still use the same Build Agent. One interesting part was that after I pushed a new build, some tests failed in TFS build and here was the error message.
Error Code: 502 Proxy Error: The ISA Server denied the specified Uniform Resource Locator
I was not aware of this IP address and this server. After I logged to the Build Agent and used mstest to run one test again, the test still failed. After looking into this issue for a while, here are the steps to fix the build issue.
Open IE and go to Tools > Internet Options > Connections > LAN Settings > Proxy Server > Advanced > Exceptions
Add IP address and domain name (i.e 10.2.1.5; xxx.domain.com) and apply the changes.
Run the test again or queue a new build. The tests pass in TFS 2013 build.