In WCF, should you have large MaxBufferPoolSize value for large messages?

For this WCF service I have developed, I have to set MaxReceivedMessageSize to 5MB. My current problem is figuring out whether it is better to have a larger MaxBufferPoolSize value, like 5MB, or retain the original 512KB value.

Does anyone knows what is the recommended setting for this scenario? In short, should I set MaxBufferPoolSize = 5242880 (5MB), or MaxBufferPoolSize = 524288 (512KB)?

UPDATE: For clarification, the service is meant to insert a new customer record along with some scanned documents. As a result, the message size may reached up to 5MB.

We could try and separate the upload of the scanned document using alternate technologies, but the requirement was both customer record and scanned documents must be in the same transaction, so we decided to go with this approach, until we figure out how to use WCF's transaction capability.

Answers


Check out this article. http://kennyw.com/?p=51

It suggests setting the MaxBufferPoolSize to zero for large messages in order to avoid buffering.


Need Your Help

SignalR not working on local IIS but working with IIS Express

asp.net iis signalr signalr-hub signalr.client

I'm trying to write a small SignalR project. When the project is set to run under IIS Express everything works as it should.

DirectX App won't draw

c visual-c++ directx directx-11

i've set up a directx engine and everything seems fine, but it won't show me the object that it needs to draw and i can't find where the problem lies. i have searched through the code with my tutor...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.