简体   繁体   English

即使增加maxReceivedMessageSize,也超出了传入消息的最大消息大小配额(65536)

[英]The maximum message size quota for incoming messages (65536) has been exceeded even after increasing maxReceivedMessageSize

I am developer a winform application with WCF service. 我正在开发带有WCF服务的Winform应用程序。 There are certain forms which display 100-200 rows in a grid. 有些表格在网格中显示100-200行。 For such cases it fails to show any data and gives this error : 在这种情况下,它无法显示任何数据并给出此错误:

在此处输入图片说明

I have gone through many questions on SO related to this issue. 我已经解决了许多与此问题相关的问题。 And I tried most of them. 我尝试了其中的大多数。 But this no luck. 但是,这没有运气。

I have changed my application's app.config to look like this :( UPDATED ) 我已经更改了应用程序的app.config,使其看起来像这样:( UPDATED

  <system.serviceModel>
    <client>
        <endpoint address="http://internaladmin.iifl.in/NBFCLAS/Service.svc"
            binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_INBFC"
            contract="NbfcService.INBFC" name="BasicHttpBinding_INBFC" />
    </client>
  <bindings>
    <basicHttpBinding>
      <binding name="BasicHttpBinding_INBFC" closeTimeout="00:59:00"
        openTimeout="00:59:00" receiveTimeout="00:10:00" sendTimeout="00:59:00"
        allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
        maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
        messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
        useDefaultWebProxy="true">
        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
          maxBytesPerRead="4096" maxNameTableCharCount="16384" />
        <security mode="None">
          <transport clientCredentialType="None" proxyCredentialType="None"
            realm="" />
          <message clientCredentialType="UserName" algorithmSuite="Default" />
        </security>
      </binding>
    </basicHttpBinding>
  </bindings>      
</system.serviceModel>

But it still does not work. 但这仍然行不通。 I face no issues while my friend to whom I have given the same EXE file is facing such issues. 当我给同一个EXE文件的朋友遇到此类问题时,我没有遇到任何问题。

Note: there is no binding section in WCF service's webconfig. 注意:WCF服务的webconfig中没有绑定部分。

Webconfig of WCF: WCF的Webconfig:

<system.serviceModel>
<bindings>
  <basicHttpBinding>
    <binding name="BasicHttpBinding_INBFC" closeTimeout="00:59:00"
        openTimeout="00:59:00" receiveTimeout="00:10:00" sendTimeout="00:59:00"
        allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
        maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
        messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
        useDefaultWebProxy="true">
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None"
          realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
    </binding>
  </basicHttpBinding>
</bindings>
<behaviors>
  <serviceBehaviors>
    <behavior>
      <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
      <serviceMetadata httpGetEnabled="true"/>
      <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
      <serviceDebug includeExceptionDetailInFaults="false"/>
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
<services>
  <service name="NbfcService.INBFC">
    <endpoint
              binding="basicHttpBinding"
              contract="NbfcService.INBFC"
              bindingConfiguration="BasicHttpBinding_INBFC" />
  </service>
</services>

You have to set the maxReceivedMessageSize on the client 'and' on the server. 您必须在客户端“ and”和服务器上设置maxReceivedMessageSize。 In your case you need to change the binding on the server as well as you did on the client. 在您的情况下,您需要更改服务器上的绑定以及更改客户端上的绑定。

<system.serviceModel>
<bindings>
  <basicHttpBinding>
    <binding name="BasicHttpBinding_INBFC" closeTimeout="00:59:00"
        openTimeout="00:59:00" receiveTimeout="00:10:00" sendTimeout="00:59:00"
        allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
        maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
        messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
        useDefaultWebProxy="true">
        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
          maxBytesPerRead="4096" maxNameTableCharCount="16384" />
        <security mode="None">
          <transport clientCredentialType="None" proxyCredentialType="None"
            realm="" />
          <message clientCredentialType="UserName" algorithmSuite="Default" />
        </security>
      </binding>
  </basicHttpBinding>
</bindings>
 <behaviors>
  <serviceBehaviors>
    <behavior>
      <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
      <serviceMetadata httpGetEnabled="true"/>
      <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
      <serviceDebug includeExceptionDetailInFaults="false"/>
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
<services>
  <service name="<My service name>">
    <endpoint 
              binding="basicHttpBinding"
              contract="<my contract name>"
              bindingConfiguration="BasicHttpBinding_INBFC" />
  </service>
</services>
</system.serviceModel>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 “已超出传入邮件的最大邮件大小限额(65536)。” 即使设定了更大的尺寸 - “The maximum message size quota for incoming messages (65536) has been exceeded.”. Even after setting greater size 已超出传入邮件的最大邮件大小限额(65536) - The maximum message size quota for incoming messages (65536) has been exceeded 错误:外部DLL已超过传入消息的最大消息大小配额(65536) - Error: maximum message size quota for incoming messages (65536) has been exceeded from external DLL WCF,已超过传入消息的最大消息大小配额(65536) - WCF, The maximum message size quota for incoming messages (65536) has been exceeded WCF 异常:已超出传入消息的最大消息大小配额 (65536) - WCF Exception: The maximum message size quota for incoming messages (65536) has been exceeded 超出了传入消息的最大消息大小配额(65536)。 Silverlight + WCF - The maximum message size quota for incoming messages (65536) has been exceeded. Silverlight+ WCF 单元测试AIF的错误消息:已超出传入邮件的最大邮件大小配额 - Error message why unit testing AIF: Maximum message size quota for incoming messages has been exceeded WCF错误:System.ServiceModel.CommunicationException已超过传入消息的最大消息大小配额 - WCF error: System.ServiceModel.CommunicationException the maximum message size quota for incoming messages has been exceeded 取消了配额最大邮件大小(默认为65536) - Quota Max Message Size exceded (default 65536) WCF最大邮件大小配额 - WCF Maximum Message Size Quota
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM