我想使用代理从外部 url 获取 json 字符串。
我需要设置什么设置才能使用代理访问 url?
这是我的示例代码:
WebClient myWebClient = new WebClient();
Response.Write(myWebClient.DownloadString(@"http://www.otherwebsite.com:11111/json.aspx"));
然后我收到一个错误,启用连接到远程服务器,但如果我删除代理它可以访问并将 json 返回给我。
有什么资料提供给我吗?