1

当我使用这样的代码时:

System.Net.WebClient objClient = new WebClient();
string url = "http://google.com";
objClient.DownloadString(url);

建立连接需要几秒钟,然后开始下载。我昨天重新安装了 Windows,这个问题就开始了。当我重新安装 Windows 时,似乎会发生此问题。

有谁知道为什么会出现这个问题?谢谢大家。

4

2 回答 2

1

查看您是否在 Internet Explorer 设置(工具 - Internet 选项 - 连接 - LAN 设置)中配置了代理。确保你得到Automatically detect settings检查。

于 2010-05-17T14:35:53.387 回答
0

也许您在 Internet Explorer 中启用了代理的自动配置?由于您没有专门设置 WebClient 对象的代理设置,因此它会查看 Internet Explorer 设置。

于 2010-05-17T14:36:40.903 回答