传输大数据到服务器端只需要在wcf服务端配置
默认的超过65535B时就会出现(413) Request Entity Too Large的异常
改变默认的传输大小
<!--这里是添加的开始-->
<bindings>
<basicHttpBinding>
<binding name="LargeDataTransferServicesBinding" maxReceivedMessageSize="247483647"
messageEncoding="Text" transferMode="Streamed" sendTimeout="00:10:00" />
</basicHttpBinding>
</bindings>
<services>
<service name="HuaYuanService.Iort.ImportData" >
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="LargeDataTransferServicesBinding"
contract="HuaYuanService.Iort.IImportData" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<!--这里是添加的结束-->
这里相当于200M的大小
从服务器端获取数据需要在客户端配置
<binding name="LargeDataTransferServicesBinding" maxReceivedMessageSize="2147483647" messageEncoding="Text" transferMode="Streamed" sendTimeout="00:10:00" />