首页 新闻 会员 周边

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

0
悬赏园豆:30 [已关闭问题] 关闭于 2011-08-08 23:17

服务器端配置:


  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="MSM.DBServiceBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IDataService" 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 behaviorConfiguration="MSM.DBServiceBehavior" name="MSM.DBService">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IDataService" contract="MSM.IService"/>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
  </system.serviceModel>

客户端配置:

<configuration>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_DBService" maxBufferSize="2147483647"
            maxReceivedMessageSize="2147483647">
          <security mode="None" />
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:1970/DBService.svc" binding="basicHttpBinding"
          bindingConfiguration="BasicHttpBinding_DBService" contract="DBService.DBService"
          name="BasicHttpBinding_DBService" />
    </client>
  </system.serviceModel>
</configuration>
这个 maxReceivedMessageSize="2147483647" 我已经设置成最大了 为什么在传输数据的时候还是提示 已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。的错误呢

寒星射手的主页 寒星射手 | 初学一级 | 园豆:190
提问于:2011-06-09 15:11
< >
分享
所有回答(2)
0

你解决了没有,我现在有相同问题!

M_GIS | 园豆:202 (菜鸟二级) | 2013-07-08 18:31
0

配置wcf配置文件:

<binding name="BasicHttpBinding_IPaiPaiService" closeTimeout="00:10:00"
openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>

1.重新生成项目,未解决 参考步骤2
2.重新添加服务引用,在配置,重新生成

一枼如来 | 园豆:221 (菜鸟二级) | 2013-09-23 18:05

还是没有解决怎么办?

支持(0) 反对(0) 等等小九吧009 | 园豆:172 (初学一级) | 2020-11-25 15:09
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册