执行下面代码时出现的出错提示:
HttpWebRequest oRequest = (HttpWebRequest)WebRequest.Create("http://www.baidu.com");
HttpWebResponse oResponse = (HttpWebResponse)oRequest.GetResponse();
请问要怎么解决这个问题?谢谢
HttpWebRequest oRequest = (HttpWebRequest)WebRequest.Create("http://www.baidu.com");
HttpWebResponse oResponse = (HttpWebResponse)oRequest.GetResponse();
请问要怎么解决这个问题?谢谢
解决方案 »
- 子窗体 页面跳转
- 请教页面加载先后顺序~!!!!
- 我完全安装了vs2005,没有装sql server,可以打开vs2005内置的那个sql server 2005吗,怎样打开?
- CSDNReader和CSDN助手不能回贴了,为什么啊?
- 高手请进!关于读取XML的问题!!!急!!
- 程序发布问题
- 有没有办法关闭当前所有打开的IE窗口
- web.config
- 小问题:关于.NET中插入.swf动画
- 水晶报表的打印,导出和尺寸控制问题
- 我已经安装了vs.2005,用ASP.NET,还需要单独安装ASP.NET吗?如果是,在哪下载?
- 我把password用GetByte存进数据库binary后,怎么样才可以和传进来的密码对比一下相不相同呢?
--------------------------------------------------------------------------------基础连接已经关闭: 无法连接到远程服务器。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Net.WebException: 基础连接已经关闭: 无法连接到远程服务器。源错误:
行 61: HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(URL);
行 62: // Sends the HttpWebRequest and waits for the response.
行 63: HttpWebResponse myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse();
行 64: // Gets the stream associated with the response.
行 65: Stream receiveStream = myHttpWebResponse.GetResponseStream();
源文件: c:\inetpub\wwwroot\webapplication1\webform1.aspx.cs 行: 63