maxReceivedMessageSize和流的WCFmaxReceivedMessageSize、WCF

2023-09-05 01:15:13 作者:伱叼╮我更拽

我把maxReceivedMessageSize =52428800transferMode =流媒体。如果不是流是实现这一价值更仁慈?流流,所以让我们拉一点点。然而,后来有最大邮件大小配额传入消息(52428800)已经被超过。为了增加配额,使用MaxReceivedMessageSize属性相应绑定元素上。

I put maxReceivedMessageSize="52428800" transferMode="Streamed". Shouldn't streaming be more benevolent toward that value? Stream is stream and so let it pull little by little. And yet later on there is "The maximum message size quota for incoming messages (52428800) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element..."

我知道,流意味着服务器的内存不会超载,但它是如何有什么不同的缓冲?

I know that streamed implies that the server's RAM won't be overloaded, but how is it else different from buffered?

推荐答案

maxReceivedMessageSize 配额是价值,这样可以有效地将其设置为无穷大(我会感到惊讶,如果你能传输超过9,223,372,036,854,775,807字节,或约8 艾字节 - 是的,我不得不仰视地图后的)。在流模式中,您还可以设置 maxBufferSize 配额限制多少数据将在特定的时间进行缓冲在RAM中。

The maxReceivedMessageSize quota is a long value, so you can effectively set it to infinity (I'd be surprised if you can transfer more than 9,223,372,036,854,775,807 bytes, or about 8 exabytes - yes, I had to look up the one after peta). On streaming mode you can also set the maxBufferSize quota to limit how much data will be buffered in RAM at a given time.