首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web Service >

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

2012-03-18 
已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize

已超过传入消息(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

热点排行