WCF 上传大数据时 报错 读取 XML 数据时,超出最大数组长度配额(16384)

前端之家收集整理的这篇文章主要介绍了WCF 上传大数据时 报错 读取 XML 数据时,超出最大数组长度配额(16384)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

修改服务端配置

服务器端没有

bindings 节点需要在system.serviceModel中增加



<bindings> <basicHttpBinding> <binding name="LargeDataTransferServicesBinding" sendTimeout="00:10:00" maxBufferPoolSize="10485760" maxBufferSize="10485760" maxReceivedMessageSize="2147483647" transferMode="Streamed" messageEncoding="Text"> <readerQuotas maxStringContentLength="10485760" maxArrayLength="10485760" maxBytesPerRead="10485760" /> </binding> </basicHttpBinding> </bindings> 在bindingConfiguration 中填写 上边 binding 的name “LargeDataTransferServicesBinding” <services> <service name="WCFdome.wcfupfiles"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="LargeDataTransferServicesBinding" contract="WCFdome.Iwcfupfiles" /> <host> <timeouts openTimeout="00:10:00" /> </host> </service> </services>

原文链接:https://www.f2er.com/xml/296957.html

猜你在找的XML相关文章