none
The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. RRS feed

  • Question

  • <?xml version="1.0"?>
    <configuration>

      <system.web>
        <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
      </system.web>
      <system.serviceModel>
        <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" />
      </system.serviceModel>
      <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
      </system.webServer>

    </configuration>

    The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. how to fix this

      
    Friday, July 25, 2014 1:56 PM

Answers

  • http://www.codeproject.com/Tips/243357/WCF-Custom-Binding

    You have to create a "Custom Binding"  where you will set ReaderQuota values. You will then point the Service behavior to the "Custom Binding" to override the default values the service is using, like set to the MaxReceivedMessageSize = 2999777777.  I  can't remeber what the max number is look it up.

    Friday, July 25, 2014 8:36 PM
  • Hi,

    In WCF Service by default the data can be transfered is 64kb, then it seems that your data is larger than it. So please try to configure the binding to increase the maxBufferSize and timeout and so on as following:

      <basicHttpBinding>
                <binding name="BasicHttpBindingConfig" closeTimeout="00:20:00"
                    openTimeout="00:20:00" receiveTimeout="00:20:00" sendTimeout="00:20:00"
                    maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Streamed">
                    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                        maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
                    <security mode="None"/>
                </binding>
         </basicHttpBinding>

    Then please do not forget to apply this binding configuration to the endpoint as following:
    <endpoint address="" binding="basicHttpBinding" 
    bindingConfiguration="BasicHttpBindingConfig"  
    contract="*****" />

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, July 28, 2014 8:16 AM
    Moderator

All replies

  • http://www.codeproject.com/Tips/243357/WCF-Custom-Binding

    You have to create a "Custom Binding"  where you will set ReaderQuota values. You will then point the Service behavior to the "Custom Binding" to override the default values the service is using, like set to the MaxReceivedMessageSize = 2999777777.  I  can't remeber what the max number is look it up.

    Friday, July 25, 2014 8:36 PM
  • Hi,

    In WCF Service by default the data can be transfered is 64kb, then it seems that your data is larger than it. So please try to configure the binding to increase the maxBufferSize and timeout and so on as following:

      <basicHttpBinding>
                <binding name="BasicHttpBindingConfig" closeTimeout="00:20:00"
                    openTimeout="00:20:00" receiveTimeout="00:20:00" sendTimeout="00:20:00"
                    maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Streamed">
                    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                        maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
                    <security mode="None"/>
                </binding>
         </basicHttpBinding>

    Then please do not forget to apply this binding configuration to the endpoint as following:
    <endpoint address="" binding="basicHttpBinding" 
    bindingConfiguration="BasicHttpBindingConfig"  
    contract="*****" />

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, July 28, 2014 8:16 AM
    Moderator