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

  • SEARCH
  • Home
  • 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 9076883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:12:24+00:00 2026-06-16T19:12:24+00:00

Possible Duplicate: The maximum message size quota for incoming messages (65536) has been exceeded

  • 0

Possible Duplicate:
The maximum message size quota for incoming messages (65536) has been exceeded

I am using WCF for file uploading and downloading. uploading is successful but when i downloading a large file i found this error

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.

My Service.config file has the following code.

<system.web>
    <compilation debug="true" />
    <httpRuntime executionTimeout="4800" maxRequestLength="2147483647" />


  </system.web>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferPoolSize="524288">
          <readerQuotas maxDepth="32" maxStringContentLength="2147483647" 
            maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"  />
        </binding>
      </basicHttpBinding>
      <!--<webHttpBinding>
        <binding maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" />
      </webHttpBinding>-->
    </bindings>
    <services>
      <service name="WITSService.WITSService">
        <clear />
        <endpoint binding="basicHttpBinding" contract="WITSService.WITSService" />
      </service>
    </services>

    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
          <dataContractSerializer maxItemsInObjectGraph="2147483646"/>
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="myEndPointBehavior">
          <dataContractSerializer maxItemsInObjectGraph="2147483646"/>
        </behavior>
      </endpointBehaviors>
    </behaviors>

    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>

can any one help me how to increase MaxReceivedMessageSize

  • 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-06-16T19:12:25+00:00Added an answer on June 16, 2026 at 7:12 pm

    Change the customBinding in the web.config to use larger defaults. I picked 2MB as it is a reasonable size. Of course setting it to 2GB (as your code suggests) will work but it does leave you more vulnerable to attacks. Pick a size that is larger than your largest request but isn’t overly large.

    Check this : Using Large Message Requests in Silverlight with WCF

    <system.serviceModel>
       <behaviors>
         <serviceBehaviors>
           <behavior name="TestLargeWCF.Web.MyServiceBehavior">
             <serviceMetadata httpGetEnabled="true"/>
             <serviceDebug includeExceptionDetailInFaults="false"/>
           </behavior>
         </serviceBehaviors>
       </behaviors>
       <bindings>
         <customBinding>
           <binding name="customBinding0">
             <binaryMessageEncoding />
             <!-- Start change -->
             <httpTransport maxReceivedMessageSize="2097152"
                            maxBufferSize="2097152"
                            maxBufferPoolSize="2097152"/>
             <!-- Stop change -->
           </binding>
         </customBinding>
       </bindings>
       <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
       <services>
         <service behaviorConfiguration="Web.MyServiceBehavior" name="TestLargeWCF.Web.MyService">
           <endpoint address=""
                    binding="customBinding"
                    bindingConfiguration="customBinding0"
                    contract="TestLargeWCF.Web.MyService"/>
           <endpoint address="mex"
                    binding="mexHttpBinding"
                    contract="IMetadataExchange"/>
         </service>
       </services>
     </system.serviceModel> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Maximum Request Length Exceeded Not Redirect on Error Page I try to
Possible Duplicate: T-SQL WHERE col IN (…) What is the maximum size for a
Possible Duplicate: Is it possible to dynamically change maximum java heap size? I know
Possible Duplicate: Android - Application (apk) Maximum size I want to install an APK
Possible Duplicate: Size Limitation of NSUserDefault? I am saving the images using NSUserDefaults .
Possible Duplicate: Maximum size for a SQL Server Query? IN clause? Is there a
Possible Duplicate: What is the Maximum Size that an Array can hold? i want
Possible Duplicate: Maximum Java heap size of a 32-bit JVM on a 64-bit OS
Possible Duplicate: Maximum length of the textual representation of an IPv6 address? What would
Possible Duplicate: How do I make a request using HTTP basic authentication with PHP

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.