HttpWebRequestError: The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF

前端 未结 4 776
甜味超标
甜味超标 2020-12-07 00:23

I have created a sample asp.net application and try to scrape data from my server using httpwebrequest. But some times I got this above error. I have done some searches on g

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-07 01:26

    Another possibility: when doing a POST, the server responds with a 100 continue in an incorrect way.

    This solved the problem for me:

    request.ServicePoint.Expect100Continue = false;

提交回复
热议问题