WcfCoreMtomEncoder icon indicating copy to clipboard operation
WcfCoreMtomEncoder copied to clipboard

maxSizeOfHeaders limits the SOAP response content size

Open pablo-d opened this issue 6 years ago • 1 comments

Hi, @lennykean! Is there a reason why the maxSizeOfHeaders is set to 1024 in the MtomMessageEncoder? And can it be a larger value? When receiving large amounts of data over SOAP (in the order of 50 MB), the XML buffer will exceeed its maximum size, and a system.ServiceModel.QuotaExceededException is thrown. The code I'm referring to is shown below.

public override Message ReadMessage(ArraySegment<byte> buffer, BufferManager bufferManager, string contentType) { using (var stream = new MemoryStream(buffer.ToArray())) { var message = ReadMessage(stream, 1024, contentType); bufferManager.ReturnBuffer(buffer.Array); return message; } }

pablo-d avatar Jan 21 '20 13:01 pablo-d

I would like to bump this request. The web service I am dealing with uses WS-Security and has very large headers, so I would need the maxSizeOfHeaders value to be much larger, like 64K instead of 1K.

dscottthomas avatar Mar 19 '21 22:03 dscottthomas