Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET WCF VS2010 REST
Hello all,
 
Thanks in advance for your answers.
 
Issue while posting PDF document with size above 65536 bytes.
 
We have a business entity with array of bytes property which holds the PDF document. While attaching the business entity to the HTTP Content we are getting an error saying “Cannot write more bytes to the buffer than the configured maximum buffer size: 65536.”. The following is the code which is giving an exception.
HttpContent content = new ObjectContent<business entity="" with="" array="" of="" bytes="" property="">(email, "text/xml");
We have tried increasing the maxBufferSize and maxReceivedMessageSize in the web config basicHttpBinding but didn’t worked.
 
NOTE: I am using VS4.0.
Posted 10-Oct-12 20:11pm
sowvin458
Edited 10-Oct-12 23:32pm
v4

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I assume you have worked this issue out by now, but just in case you haven't. Sometimes that error can occur if the response is too large, so you would additionally need to set the MaxResponseContentBufferSize. Have you tried that yet?
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.141022.2 | Last Updated 12 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100