Open snakefoot opened 6 years ago
IWebProxy proxy = WebRequest.GetSystemWebProxy(); proxy.Credentials = System.Net.CredentialCache.DefaultCredentials; request.Proxy = proxy; request.PreAuthenticate = true;
Cache the default proxy to avoid auto lookup for every WebRequest.
Maybe a tristate (Explicit Proxy, Auto Proxy, Without Proxy - null):
https://stackoverflow.com/questions/2519655/httpwebrequest-is-extremely-slow
Can also be configured globally for the entire application:
<system.net> <defaultProxy enabled="true" useDefaultCredentials="true"> <proxy usesystemdefault="True" /> </defaultProxy> </system.net>
https://msdn.microsoft.com/en-us/library/dkwyc043.aspx
Thanks @snakefoot , makes sense! 👍
Cache the default proxy to avoid auto lookup for every WebRequest.
Maybe a tristate (Explicit Proxy, Auto Proxy, Without Proxy - null):
https://stackoverflow.com/questions/2519655/httpwebrequest-is-extremely-slow
Can also be configured globally for the entire application:
https://msdn.microsoft.com/en-us/library/dkwyc043.aspx