请高手进来帮忙

mm58123 2006-10-29 11:20:00
程序如下:
class sqlAccess{
private static Stream receiveStream = null;
private static StreamReader readStream = null;
private static HttpWebResponse response = null;
private static HttpWebRequest request = null;

static void Main(String []args){
try{
request = (HttpWebRequest)WebRequest.Creat(args[0]);
response = (HttpWebResponse)request.GetResponse();
receiveStream = response.GetResponseStream();
Encoding encode = System.Text.Encoding.GetEncoding("gb2312");
readStream = new StreamReader(receiveStream, encode);
Console.WriteLine(readStream.ReadToEnd());
}catch(Exception e){
Console.WriteLine(e);
}finally{
if(readStream != null)
readStream.Close();
if(receiveStream != null)
receiveStream.Close();
if(response != null)
response.Close();
}
}
}
获取很多网页都没问题,但"http://www.s1338.com/app/member/",又不发生异常,输出就是一段空白。我用JAVA去获取,一切正常。
请问是什么原因啊?
...全文
74 回复 打赏 收藏 举报
写回复
回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
发帖
C#

10.8w+

社区成员

.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
帖子事件
创建了帖子
2006-10-29 11:20
社区公告

让您成为最强悍的C#开发者