http://www.test.com/function/sAll!getCaseDetail?Id=C00000002580952就好像这些..
当我抓取这个网站的数据的时候.报500错误..

解决方案 »

  1.   

    我是用
      System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(url);
                    request.UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)";
                    System.Net.WebResponse response = request.GetResponse();
                    System.IO.Stream resStream = response.GetResponseStream();
                    System.IO.StreamReader sr = new System.IO.StreamReader(resStream, Encoding.UTF8);
                    string html = (sr.ReadToEnd());
                    resStream.Close();
                    sr.Close();
                    return html; 
    这个方法的.
    能提供下其他抓取的方法么?
      

  2.   


      System.Net.WebResponse response = request.GetResponse();
    这句就报500错了.
      

  3.   

    http://www.ruyicai.com/chlw/function/selectAll!getCaseDetail?caselotId=C00000002580952谢谢
      

  4.   

    你这个地址在浏览器浏览就是HTTP Status 500 -type Exception reportmessagedescription The server encountered an internal error () that prevented it from fulfilling this request.exceptionjava.lang.NullPointerExceptionnote The full stack trace of the root cause is available in the Apache Tomcat/6.0.33 logs.
    Apache Tomcat/6.0.33程序当然是500 了
      

  5.   

    那个我给的时候还好的.可能是因为过期了.
    http://www.ruyicai.com/chlw/function/selectAll!getCaseDetail?caselotId=C00000002597450
    你看这个.这是可以的.
    谢谢.
      

  6.   

    我想是因为它有个cookie,要打开首页,http://www.ruyicai.com/然后在打开那个地址就可以了.
    我找了个朋友试也是这样.这样的东西如何抓呢?