Section=ResponseStatusLine

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

   The server committed a protocol violation. Section=ResponseStatusLine

 

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

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

你可能感兴趣的:(response)