I believe I understand the practical differences between HttpWebRequest.Timeout
and HttpWebRequest.ReadWriteTimeout
. However, I\'m seeking further<
The previous answers suggest changing the ReadWriteTimeout and the timeout. Here's the Webclient override function you need to do this.
protected override WebRequest GetWebRequest(Uri address)
{
_request = base.GetWebRequest(address);
var httpRequest = _request as HttpWebRequest;
httpRequest.ReadWriteTimeout = 600000;
httpRequest.Timeout = 600000;
httpRequest.ContinueTimeout = 600000;
if (_request != null)
{
httpRequest.AllowAutoRedirect = AutoRedirect;
httpRequest.CookieContainer = CookieContainer;
httpRequest.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
Setup?.Invoke(httpRequest);
}
return _request;
}