1

Problem - When downloading a number of files either through a WebClient or a HTTPWebRequest the download will randomly but regularly hang and give a "System.Net.WebException: The operation has timed out.". When using the HTTPWebRequest I can tell that this exception is being thrown from the ConnectStream.Read method part way through reading the stream. Changing the method to read the stream, Stream.CopyTo vs Stream.ReadByte vs Stream.Read, has no impact what so ever.

I've stoped this exception having any impact on our software by putting in some re-try code for the download but I really want to know what is causing this exception?

Background - As part of our custom data synchronisation our software has to download a number of zip files (less than 2 mb) from our online server (IIS7) over HTTPS. On one of our development machines we are getting the above issue, but we are not getting it on an identical machine running the exact same code.

stevehipwell
  • 56,138
  • 6
  • 44
  • 61

0 Answers0