0
大的maxBufferSize
可能會導致內存不足異常嗎? (System.InsufficientMemoryException: Failed to allocate a managed memory buffer of 67108864 bytes. The amount of available memory may be low.
)?WCF maxBufferSize和內存不足異常相關?
大的maxBufferSize
可能會導致內存不足異常嗎? (System.InsufficientMemoryException: Failed to allocate a managed memory buffer of 67108864 bytes. The amount of available memory may be low.
)?WCF maxBufferSize和內存不足異常相關?
是的,沒有。降低緩衝區大小肯定有助於消除錯誤,但WCF在需要時才分配內存。所以顯然你試圖發送需要高達67MB內存的東西來發送/接收。既然如此,降低緩衝區大小隻會導致發送/接收失敗,除非你調整了其他的東西。
如果適用於您嘗試此解決方案:wcf error while communicating large data
它的要點是嘗試,如果你能客戶端和服務器端點上開啓流模式。
...
<basicHttpBinding>
<binding name="your_binding" maxReceivedMessageSize="your_max"
transferMode="Streamed"/>
</basicHttpBinding>
...
可能。它可能不是。爲什麼猜測什麼時候可以檢查內存何時分配? –