WCF HttpClient Error calling a RESTful WCF Service - Cannot write more bytes to the buffer than the configured maximum buffer size: 65536
- by 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/") };