Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4100292
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:32:52+00:00 2026-05-20T20:32:52+00:00

I have a WCF web service that is accepting some custom objects and a

  • 0

I have a WCF web service that is accepting some custom objects and a number of documents sent as byte arrays.

But each time I send a document (not a particularly large one) the WS returns a 400 bad request, and in the trace log it appears to have thrown a MaxReceivedMessageSizeExceeded.
saying

System.ServiceModel.ProtocolException:
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.

Now the client app has this in its app.config

<wsHttpBinding>
    <binding name="WSHttpBinding_IReferrals" 
        closeTimeout="00:01:00" openTimeout="00:01:00" 
        receiveTimeout="00:10:00" sendTimeout="00:01:00"
        bypassProxyOnLocal="false" transactionFlow="false" 
        hostNameComparisonMode="StrongWildcard"
        maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" 
        messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
        allowCookies="false">
        <readerQuotas maxDepth="32" 
            maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />

and in the WCF web.config I have this

<service behaviorConfiguration="WCFReferrals.Service1Behavior"
        name="WCFReferrals.Referrals">
     <endpoint address="" binding="wsHttpBinding" contract="WCFReferrals.IReferrals">
          <identity>
            <dns value="localhost" />
          </identity>
     </endpoint>
     <endpoint address="mex" binding="wsHttpBinding" contract="IMetadataExchange" />
 </service>
 ....
 <binding name="wsHttpBinding" maxBufferPoolSize="2147483647"
          maxReceivedMessageSize="2147483647">
     <readerQuotas maxDepth="32" maxStringContentLength="2147483647"
            maxArrayLength="2147483647" maxBytesPerRead="4096" 
            maxNameTableCharCount="16384" />
 </binding>

Clearly I am missing something as as far as I can see I have all the max message limits set waaaaay over what is necessary..

Any help would be happily received

thanks

nat

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T20:32:53+00:00Added an answer on May 20, 2026 at 8:32 pm

    First of all: on your server side, you define the binding configuration with larger message size, but you don’t reference it from your endpoint.

    <service behaviorConfiguration="WCFReferrals.Service1Behavior"
             name="WCFReferrals.Referrals">
       <endpoint 
             address="" 
             binding="wsHttpBinding" 
             bindingConfiguration="LargeSizeMessages"  <== you need to reference the binding config (by specifying its name
            contract="WCFReferrals.IReferrals">
        </endpoint>
        .....
      </service>
      ....
      <binding name="LargeSizeMessages"   <== give it a meaningful name
           maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
           <readerQuotas maxDepth="32" maxStringContentLength="2147483647"
               maxArrayLength="2147483647" maxBytesPerRead="4096" 
               maxNameTableCharCount="16384" />
      </binding>
    

    Also: are you doing the same thing on your client-side? Does your client-side config (app.config or web.config) also include that large message size binding configuration? Are you referencing that binding configuration in your <client> .. <endpoint> element??

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a silverlight 2 beta 2 application that accesses a WCF web service.
I have converted my web service to wcf service which has some datacontracts. As
I have a WCF web service that returns a stream. At the client side
I have a WCF web service that uses ASP.NET session state. WCF sets a
I have a WCF web service that implements a parameter List<ICustomObject> . In the
I have a WCF web service that returns a string to a Java based
I have a WCF web service that implements a RESTful interface. We're using the
I have WCF web service and client that calls this service, This client will
I have a WCF web service called Palladium that is created as a project
I have a WCF web service that is setup to use Message based security.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.