求助 Unable to connect to the remote server

myyihua 2006-10-10 04:06:43
代码如下:
System.Net.WebClient wc = new System.Net.WebClient();
System.IO.Stream stream = wc.OpenRead("http://www.baidu.com");

就这两句 出错的是第二句
提示的错误信息
System.Net.WebException: The underlying connection was closed: Unable to connect to the remote server.

我试过的方法:
1.代理设置正确。
2.将firewall禁掉。
3.将Lan设置中的Automatically Detect Settings禁掉。
4.重装.Net Framework。
都不行
有高手来帮忙一下阿?
...全文
285 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
myyihua 2006-10-10
  • 打赏
  • 举报
回复
怎么没有人不会遇到过?
myyihua 2006-10-10
  • 打赏
  • 举报
回复
单步运行的话到第二句就弹出错误框
具体内容如下:
An unhandled exception of type 'System.IO.IOException' occurred in Unknown Module.

Additional information: Unable to create a transport connection.

17,740

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 .NET Framework
社区管理员
  • .NET Framework社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧