Use default credentials for the proxy if none provided
The UseDefaultCredentials on WebClient (if true) will send creds to the server if requested not the proxy. The Proxy object on WebClient is a IWebProxy which only has a Credentials member (yes could probably cast to WebProxy). This change will send the default creds to the default proxy servertemp
parent
5bb677d3d1
commit
8a092df9d6
|
@ -65,7 +65,8 @@ public class Program
|
|||
proxy.BypassProxyOnLocal = false;
|
||||
x.Proxy = proxy;
|
||||
} else {
|
||||
x.UseDefaultCredentials = true;
|
||||
if (null != x.Proxy)
|
||||
x.Proxy.Credentials = CredentialCache.DefaultCredentials;
|
||||
}
|
||||
|
||||
var df = "#REPLACEDF#";
|
||||
|
|
Loading…
Reference in New Issue