20
[Web开发 > ASP.NET]
在使用WebClient爬行网页的时候出现这个错误,是什么问题呢?
System.IO.InvalidDataException: GZip 头中的幻数不正确。请确保正在传入 GZip 流。
在 System.IO.Compression.GZipDecoder.ReadGzipHeader()
在 System.IO.Compression.Inflater.Decode()
在 System.IO.Compression.Inflater.Inflate(Byte[] bytes, Int32 offset, Int32 length)
在 System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset, Int32 count)
在 System.IO.Compression.GZipStream.Read(Byte[] array, Int32 offset, Int32 count)
在 System.IO.StreamReader.ReadBuffer()
在 System.IO.StreamReader.ReadToEnd()
PS:我是使用Header自动判断是否采用了GZip压缩的,能执行到这里应该是读取到了Header中的相关参数,这个是解压的问题还是对方网站的问题呢?
提问时间:2010-6-29 20:04:07
| 提问者:
GaLiJiKuai
| 悬赏:
20 | 浏览:
311