我想上传一个带有WebClient.UploadFile的文件,并且是
string proxyserver = "http://10.0.0.127:8080/";
IWebProxy proxy = new WebProxy(proxyserver);
proxy.Credentials = CredentialCache.DefaultCredentials;
WebClient Client = new WebClient();
Client.Headers.Add("UA-CPU", "x86");
Client.Headers.Add("Accept-Language", "en-us");
Client.Headers.Add("Cache-Control", "no-cache");
Client.Proxy = proxy;
byte[] rawResponse = Client.UploadFile(uri, filename);
string response = System.Text.Encoding.ASCII.GetString(rawResponse);
我正在获取远程服务器返回错误403 Forbidden如果我评论代理我能够得到响应,但我看不到提琴手的反应,不知道为什么?以及如何使用代理
进行此操作