Have you seen this error:
System.ServiceModel.ProtocolException: The remote server returned an unexpected response: (502) ProxyError (The URL is invalid. The request was not entered correctly. Enter the correct URL and try again.) -> System.Net.WebException: The remote server returned an error: (502) bad gateway.
?
If you're using Http and getting this error or “(504) Gateway Timeout“ errors, there's a good chance it's tied to your proxy configuration.
For those unfamiliar with the binding elements specific to proxies, Kennyw covered this recently, I'd recommend checking it out.
Get the scoop here - http://kennyw.com/indigo/106