服务器提交协议冲突 Section=ResponseStatusLine 的解决办法

来源:互联网 发布:蓄水池算法 面试 编辑:程序博客网 时间:2024/05/01 07:19

  在使用HttpWebrequest抓取信息的时候,遇到了一个错误!

   The server committed a protocol violation. Section=ResponseStatusLine

 

  解决办法:在Web.config中加入

<system.net>
    <settings>
      <httpWebRequest useUnsafeHeaderParsing="true" />
    </settings>
  </system.net>

 
原创粉丝点击