[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.4

Message size quota for incoming messages (65536) has been exceeded

Asked by PurpleJuice in Web Services and WCF, .NET Framework 3.x versions

Tags: WCF, message size quota, IIS

I have a public facing web server with IIS hosting WCF 3.5. When the request is received, the host turns around and calls another WCF 3.5 service inside the firewall, hosted in a .NET Windows Service.

I started having this problem when a client sends more than 200 objects in the List<t> into one of my methods. I read numerous posts about how to resolve this, but my attempts haven't worked. I get this error: "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.".

Here is the config in my Web.config for the IIS hosted WCF:

<system.serviceModel>
      <behaviors>
        <serviceBehaviors>
          <behavior name="OrderBehavior">
            <serviceMetadata httpGetEnabled="true" />
            <serviceDebug includeExceptionDetailInFaults="true" />
          </behavior>
        </serviceBehaviors>
      </behaviors>
      <bindings>
        <basicHttpBinding>
          <binding name="Binding" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" >
            <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          </binding>
        </basicHttpBinding>
      </bindings>
      <services>
          <service behaviorConfiguration="OrderBehavior" name="MonaVie.IBS.Service.IBSServiceIIS">
              <endpoint address="http://nathanj-desktop/IBSService/IBSService.svc"
                  binding="basicHttpBinding" bindingConfiguration="Binding"
                  name="IBSServiceEndpoint" contract="MV.IBS.Service.IIBS" />
          </service>
      </services>
  </system.serviceModel>

...and here is the section from my app.config in the .NET Windows Service hosted WCF:

<system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="SecureOrderBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <basicHttpBinding>
        <binding name="Binding" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="SecureOrderBehavior" name="MV.IBS.Service.IBSService">
        <endpoint
          address="http://nathanj-desktop:8001/IBSService"
          binding="basicHttpBinding"
          bindingConfiguration="Binding"
          name="IBSServiceEndpoint"
          contract="MV.IBS.Service.IIBS" />
        <host>
          <baseAddresses>
            <add baseAddress="http://nathanj-desktop:8001/IBSService" />
          </baseAddresses>
        </host>
      </service>
    </services>
  </system.serviceModel>

The IIS (1st) address is http://nathanj-desktop/IBSService/IBSService.svc.
The Windows Service (2nd) address (receives request from WCF in IIS) is http://nathanj-desktop:8001/IBSService.

I did google searches on this error message and read dozens of articles and tried various things.

IMPORTANT: It seems the problem is between the IIS WCF and the Windows Service WCF, not between the client and IIS. When I set a breakpoint in my .net code hosted in IIS, I get to the breakpoint and the hundreds of List<object>'s are there -- they came in. But when the code calls into the winservice-hosted code, that's when I get the error. But you can see that I have very similar config in the winservice app.config.

Please help.
[+][-]08/13/09 04:37 PM, ID: 25094151Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Web Services and WCF, .NET Framework 3.x versions
Tags: WCF, message size quota, IIS
Sign Up Now!
Solution Provided By: PurpleJuice
Participating Experts: 0
Solution Grade: A
 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_EXPERT_20070906