Results 1 to 2 of 2

Thread: How to get HttpWebRequest.Timeout to work with a proxy

  1. #1

    Thread Starter
    Frenzied Member cory_jackson's Avatar
    Join Date
    Dec 2011
    Location
    Fallbrook, California
    Posts
    1,145

    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?

  2. #2
    Frenzied Member
    Join Date
    Apr 2016
    Posts
    1,415

    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width