WCF 大文件传输配置

<bindings>
    <webHttpBinding>
        <!--这个是接收大数据加的,设置WCF服务器端数据接收上限参数,此处单位字节,故2147483647字节==2G,
        仅修改这里尚不能突破 .net默认只能传4M文件的限制,还要修改 httpRuntime maxRequestLength 参数-->
        <binding name="CustomWebBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed" sendTimeout="00:05:00">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
        </binding>
    </webHttpBinding>
</bindings>
<services>
    <service name="TravelMobileWCF_IISServer.WCFService">
        <endpoint address="/service" behaviorConfiguration="web" binding="webHttpBinding" bindingConfiguration="CustomWebBinding" contract="TravelMobileWCF_IISServer.IServerInterface" />
    </service>
</services>
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容