异步HttpWebResponse被截断如果响应的大小更大

时间:2013-12-10 12:38:18

标签: c# .net httpwebrequest httpwebresponse

我使用下面的代码从回调函数中的webservice获取json字符串,并使用“POST”方法请求请求

HttpWebRequest request = (HttpWebRequest)asynchronousResult.AsyncState;                   
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(asynchronousResult);
Stream streamResponse = response.GetResponseStream();
StreamReader streamRead = new StreamReader(streamResponse);
string responseString = streamRead.ReadToEnd();

上面的代码在响应长度很小时工作,但在特定情况下我收到一个更大的响应,大小约为1.35mb,我收到它被截断但我能够在浏览器中查看完整的响应终端

请提前帮助,请提供帮助

0 个答案:

没有答案