WebClient and Proxy settings - or fun with Download Accelerators

I have a relatively simple function that uses the WebClient class to do HTTPS POST to a web server. This code works reliably, but there are problems using the EarthLink or AT & T download accelerator features.

The boot accelerator works by changing the remote access proxy to specify localhost: 8080 for the HTTP protocol only. In this configuration, it is assumed that the HTTPS protocol should not be affected. In fact, when using Internet Explorer to go to https://www.wellsfargo.com , there is no mistake.

However, when using .NET 2.0 (or 3.5), the WebClient class cannot run a simple HTTPS GET from https://www.wellsfargo.com in this configuration.

As a simple test, I do the following:

Specify the advanced LAN proxy configuration, where:

HTTP address: hit: 8080

Secure Address: securewhacked: 8081

In C #, I call the following functions:

IWebProxy defaultWebProxy = WebRequest.DefaultWebProxy; Uri proxyUri = defaultWebProxy.GetProxy("https://www.wellsfargo.com"); 

I expect proxyUri to be "securewhacked: 8081".

Instead, proxyUri "hacked: 8080".

This is similar to a mistake in using the "automatic" .NET proxy. And the result is that our software crashes when you turn on the boot accelerator.

Does anyone know what is going on here?

I know that it is relatively easy for clients to turn off the accelerator, but I would prefer our software to be ready without requiring that the accelerator be turned off.

Any suggestions appreciated.

+4
source share
1 answer

Is the accelerator installed on user proxy settings (IE), proxy settings (WinHTTP), or both? If IE, you can try using proxycfg -u to import IE settings into WinHTTP (since I believe this is what WebClient (and .NET) uses).

0
source

All Articles