修改服务端配置
服务器端没有
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>