How to get HttpWebRequest.Timeout to work with a proxy
A HttpWebRequest times out at 100 s by default. If I set the Timeout property to 10 s, it behaves as expected. If I do they same with a WebProxy, the connection times out at 100 s. Apparently the settings doesn't apply when using a proxy. How can I get timeout to work with a proxy?
Re: How to get HttpWebRequest.Timeout to work with a proxy
Hi Cory,
When using a proxy server the usual timeout settings of the request don't apply. You need to set a separate timeout for the proxy server in order for the request to time out.
So the problem is that the timeot settings that you set for a request don't always work when using a proxy server
Code:
Proxy.ReadWriteTimeout