标签:
最近使用WCF遇到一个问题:当客户端向WCF服务发送一个大量数据时候,发现会提示:
<bindings>
<basicHttpBinding>
<binding name="NewBinding0" closeTimeout="10:10:00" openTimeout="10:10:00" receiveTimeout="10:10:00" sendTimeout="10:10:00" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" transferMode="Streamed" useDefaultWebProxy="true">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="NewBehavior0" name="WcfService.GXSC.LoginService">
<endpoint binding="basicHttpBinding" contract="WcfService.GXSC.ILoginService" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:1379/GXSC/LoginService.svc" />
</baseAddresses>
</host>
</service>
<service behaviorConfiguration="NewBehavior0" name="WcfService.GXSC.ShipInfoService">
<endpoint binding="basicHttpBinding" contract="WcfService.GXSC.IShipInfoService" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:1379/GXSC/ShipInfoService.svc" />
</baseAddresses>
</host>
</service>
</services>
2.<behaviors>下 <serviceBehaviors>节点下添加如下:
<behavior name="NewBehavior0">
<serviceMetadata httpGetEnabled="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<serviceThrottling maxConcurrentCalls="1000" maxConcurrentSessions="1000" maxConcurrentInstances="1000" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
就ok了
标签:
原文地址:http://blog.csdn.net/feter1992/article/details/45536863