如何使用WebClient指定代理服务器和端口?

时间:2014-05-15 05:42:28

标签: .net vb.net proxy webclient

Using client As New WebClient()
    Dim responseArray As Byte() = client.UploadFile(strUrl, strFileToUpload)
End Using

如何使用proxy来修改上述内容?在上述方案中指定proxy serverport的最佳方式是什么?

1 个答案:

答案 0 :(得分:0)

在WebClient对象构建后立即添加

client.Proxy = New WebProxy("YourProxyServerName", 80)
相关问题