日期:2014-05-18 浏览次数:20793 次
WebClient MyWebClient = new WebClient(); MyWebClient.Headers[HttpRequestHeader.AcceptEncoding] = "gzip, deflate"; string html = MyWebClient.DownloadString("http://bbs.dahe.cn/bbs/thread-1647174-2498-1.html");
------解决方案--------------------
压缩的可使用
System.IO.Compression.DeflateStream responseStream =new System.IO.Compression.DeflateStream( httpWebResponse.GetResponseStream(),System.IO.Compression.CompressionMode.Decompress);