System.IO.InvalidDataException: GZip 头中的幻数不正确。请确保正在传入 GZip 流。
[已关闭] System.IO.InvalidDataException: GZip 头中的幻数不正确。请确保正在传入 GZip 流。
当前页面:http://www.senparc.com/SZD-140
{ 收藏当前页面 }
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中的相关参数,这个是解压的问题还是对方网站的问题呢?
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中的相关参数,这个是解压的问题还是对方网站的问题呢?
评论(1)
yuha521
于
2010/10/14 3:18:35
评论:
你好, 不知道你的问题解决了没有, 我也遇到这样的问题 。。 。怎么样解决哦。。 你知道的话请教教我!我的QQ504402105 或者504402105@qq.com 谢谢大哥!!!
其他参考答案(0)
提交失败!请检查错误!错误信息:
以下信息或许对您有用:
- [已解决] 20 ASP.NET 4.0中关于图标、SEO、页面输出缓存(Charts,SEO,O... 2010/10/15 12:41:36
- [已解决] 10 Unable to read data from the transport c... 2010/10/9 15:45:37
- [已解决] 20 如何让线程停止,等待10秒钟? 2010/9/9 22:51:30
- [已解决] 20 最新的Razor模板语法介绍在哪里可以找到? 2010/8/5 14:21:42
- [已解决] 10 请问C#中的WebResponse.CharacterSet是通过真么得到的?是... 2010/7/21 13:19:33