为什么WCF中的流限制为65536字节? [英] Why is the streaming in WCF limits itself to 65536 bytes?

查看:92
本文介绍了为什么WCF中的流限制为65536字节?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经覆盖了Stream,并将其从服务器返回给客户端,

我一直在尝试所有类型的配置,但我看到无论如何,数组总是65536大小在Read



 public override int Read(byte [] array,int offset,int count)





试图改变所有类型的配置:



<绑定名称=webHttpBindingConfigtransferMode =StreamedmaxReceivedMessageSize =9999maxBufferSize =9999maxBufferPoolSize =9999> 
< readerQuotas maxDepth =32maxStringContentLength =81921maxArrayLength =163841maxBytesPerRead =40961maxNameTableCharCount =163841/>
< security mode =Transport>
< transport clientCredentialType =NoneproxyCredentialType =Nonerealm =/>
< / security>
< / binding>





有什么影响吗?

解决方案

看起来你需要将maxReceivedMessageSize设置为更高的值



请参考 - http://www.c-sharpcorner.com/uploadfile/afenster/wcf-streaming-large-data-files/ [ ^ ]

I've overriden a Stream, and returned it from server to client,
i've been trying all kind of configuration, but i saw that no matter what, the array is always 65536 sized in the Read

public override int Read(byte[] array, int offset, int count)



tried to change all kind of configuration:

<binding name="webHttpBindingConfig" transferMode="Streamed" maxReceivedMessageSize="9999" maxBufferSize="9999" maxBufferPoolSize="9999">
          <readerQuotas maxDepth="32" maxStringContentLength="81921" maxArrayLength="163841" maxBytesPerRead="40961" maxNameTableCharCount="163841"/>
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
          </security>
        </binding>



Is there anything that affects it?

解决方案

Looks like you need to set maxReceivedMessageSize to some higher value

Please refer - http://www.c-sharpcorner.com/uploadfile/afenster/wcf-streaming-large-data-files/[^]


这篇关于为什么WCF中的流限制为65536字节?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆