用WebRequest、WebResponse获取远程服务器页面内容时出错:
服务器提交了协议冲突. Section=ResponseHeader Detail=CR 后面必须是 LF
解决方案:
在web.config中加入下边内容即可:
<configuration>
<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>
</configuration>
<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>
</configuration>