System.Net.HttpWebResponse.GetResponseStream() returns truncated body in WebException

后端 未结 1 606
失恋的感觉
失恋的感觉 2021-01-02 08:33

For some reason beyond my understanding requests made to a perticular website (https://learningnetwork.cisco.com/people/mrollins?view=profile) result in a reqsponse-object w

相关标签:
1条回答
  • 2021-01-02 09:09

    HttpWebRequest has a static property that limits the length of web requests. this line of code, inserted before the request is made, solves the problem.

    HttpWebRequest.DefaultMaximumErrorResponseLength = 1048576;
    
    0 讨论(0)
提交回复
热议问题