解决方法
This post by Brian Grinstead解释了如何做到这一点.
对于代理支持,您只需将代理设置传递给HttpWebRequest.因此,在上面的示例中,您将更改:
HttpWebRequest request = WebRequest.Create(postUrl) as HttpWebRequest;
至:
string MyProxyHostString = "192.168.1.200"; int MyProxyPort = 8080; HttpWebRequest request = WebRequest.Create(postUrl) as HttpWebRequest; request.Proxy = new WebProxy (MyProxyHostString,MyProxyPort);