やってみました :
WebProxy proxy = new WebProxy(@"http://myproxy.com/proxypac.asp");
または
WebProxy proxy = WebRequest.GetSystemWebProxy();
回避策は、ファイルを開き、その内容をチェックして、取得したプロキシアドレスとポートを確認することです。
myproxy.com/proxypac.asp
ファイルをダウンロードすると、次のようになります。
function FindProxyForURL(url, host) {
// our local URLs from the domains below example.com don't need a proxy:
if (shExpMatch(url,"*.example.com/*")) {return "DIRECT";}
if (shExpMatch(url, "*.example.com:*/*")) {return "DIRECT";}
// URLs within this network are accessed through
// port 8080 on fastproxy.example.com:
if (isInNet(host, "10.0.0.0", "255.255.248.0")) {
return "PROXY fastproxy.example.com:8080";
}
// All other requests go through port 8080 of proxy.example.com.
// should that fail to respond, go directly to the WWW:
return "PROXY proxy.example.com:8080; DIRECT";
}