当前位置: 代码迷 >> Web Service >> 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。解决办法
  详细解决方案

已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。解决办法

热度:383   发布时间:2016-05-02 02:54:28.0
已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。
vs2010 + sql2005 报错如题,查看配置文件如下,请教高手为什么?救命啊



服务端web.config
XML code
 <system.serviceModel>    <client />    <behaviors>      <serviceBehaviors>        <behavior name="">          <serviceMetadata httpGetEnabled="true" />          <serviceDebug includeExceptionDetailInFaults="false" />        </behavior>      </serviceBehaviors>    </behaviors>    <bindings>      <basicHttpBinding>                <binding name="DBService"                  maxBufferPoolSize="2147483647"                  maxReceivedMessageSize="2147483647"                  maxBufferSize="2147483647">          <readerQuotas maxArrayLength="2147483647"                         maxBytesPerRead="2147483647"                         maxDepth="2147483647"                         maxNameTableCharCount="2147483647"                         maxStringContentLength="2147483647"/>        </binding>      </basicHttpBinding>    </bindings>    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>    <services>      <service name="第二版.DBService">        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="DBService"            contract="第二版.DBService" />        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />      </service>    </services>  </system.serviceModel>


客户端 ServiceReferences.ClientConfig
XML code
<configuration>       <system.serviceModel>        <bindings>            <basicHttpBinding>                <binding name="BasicHttpBinding_DBService" maxBufferSize="2147483647"                    maxReceivedMessageSize="2147483647">                    <security mode="None" />                </binding>            </basicHttpBinding>        </bindings>        <client>            <endpoint address="http://localhost:1876/DBService.svc" binding="basicHttpBinding"                bindingConfiguration="BasicHttpBinding_DBService" contract="ServiceReference1.DBService"                name="BasicHttpBinding_DBService" />        </client>    </system.serviceModel></configuration>


------解决方案--------------------
http://blog.csdn.net/fangxinggood/article/details/6031072
  相关解决方案