I was trying to transfer a fairly large amount of data upto 100MB (most XFERs were going to be small but it was possible to request a large amount of data) I tried to do this without streaming. I set every WCF configuration parameter to very large sizes and MTOM encoding.
system.web - parameter
- httpRuntime maxRequestLength="1048576"
BasicHttp Binding parameters:
- maxBufferSize="2147483647"
- maxBufferPoolSize="2147483647"
- maxReceivedMessageSize="2147483647"
- messageEncoding="Mtom"
readerQuotas - maxDepth="500000000" - maxStringContentLength="500000000" - maxArrayLength="500000000" - maxBytesPerRead="500000000"
endpointBehaviors
- dataContractSerializer maxItemsInObjectGraph="65536000"
But I was still getting, "..failed to allocate a managed memory buffer. the amount of available memory may be low."
I decided to change to a streaming interface, but just for grins I tried just setting the WCF transferMode to stream and ran the application again without changing the interface to return a stream and much to my surprise everything worked. It seems like the "stream" transfer mode increased some other buffer, eventhough the actual interface methods were not being streamed.
Can anyone explain why this works?