您的位置:首页 > 其它

WCF 大文件传输配置

2016-12-27 23:05 330 查看
<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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: