Geeks With Blogs

News ASP.net Forms Justin Hoffman
Justin Hoffman

Using the HttpClient API from wcf.codeplex.com, you may encounter this error if respones are too large.  

Cannot write more bytes to the buffer than the configured maximum buffer size: 65536

In order to increase the size of the Response Buffer, just increase the MaxReseponseContentBufferSize as shown below. Increase it to something larger than the default: 65536 depending on your response sizes.

     
var client = new HttpClient
{
MaxResponseContentBufferSize = 196608,
BaseAddress = new Uri("http://myservice/service1/")

};

Posted on Friday, March 4, 2011 1:10 PM | Back to top


Comments on this post: WCF HttpClient Error calling a RESTful WCF Service - Cannot write more bytes to the buffer than the configured maximum buffer size: 65536

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Justin Hoffman | Powered by: GeeksWithBlogs.net