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 6359507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:31:39+00:00 2026-05-24T23:31:39+00:00

I am calling a WCF service from some stub. The issue is that, I

  • 0

I am calling a WCF service from some stub. The issue is that, I can not have the app.config on the client side. So I am setting the values from within my code.

The service web.config shows values like this:

  <system.serviceModel>
    <diagnostics>
      <messageLogging logMalformedMessages="true" logMessagesAtTransportLevel="true" />
    </diagnostics>
    <behaviors>
        <serviceBehaviors>
            <behavior>
                <serviceMetadata httpGetEnabled="true"/>
                <serviceDebug includeExceptionDetailInFaults="true"/>
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <bindings>
       <basicHttpBinding>
         <binding name="BasicHttpBinding_IStatementsManagerService" openTimeout="00:10:00" 
                closeTimeout="00:10:00" sendTimeout="00:10:00" receiveTimeout="00:10:00"
                allowCookies="false" bypassProxyOnLocal="true" 
                hostNameComparisonMode="StrongWildcard"
                maxBufferSize="567890" maxBufferPoolSize="524288" maxReceivedMessageSize="567890"
                messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                useDefaultWebProxy="true">
            <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" 
                          maxArrayLength="2147483647" maxBytesPerRead="2147483647" 
                          maxNameTableCharCount="2147483647" />
           <!--<security mode="None">
             <transport clientCredentialType="None" proxyCredentialType="None"
                 realm="" />
             <message clientCredentialType="UserName" algorithmSuite="Default" />
           </security>-->
         </binding>
       </basicHttpBinding>
    </bindings>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
    <services>
      <service name="PathFINDER.Services.IStatementsManagerService">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IStatementsManagerService"
                contract="PopulateReqProServiceERReqs.IStatementsManagerService"
                name="BasicHttpBinding_IStatementsManagerService" />
            <endpoint kind="mexEndpoint" address="mex" />
      </service>
    </services>
    </system.serviceModel>

And the code on the client side is like this:

            BasicHttpBinding binding = new BasicHttpBinding();
            //System.ServiceModel.Channels.Binding binding = new BasicHttpBinding();
            TimeSpan t = new TimeSpan(0, 2, 0);
            binding.Name = "BasicHttpBinding_IStatementsManagerService";
            binding.CloseTimeout = new TimeSpan(00, 01, 00);
            binding.OpenTimeout = new TimeSpan(00, 01, 00);
            binding.ReceiveTimeout = new TimeSpan(00, 10, 00);
            binding.SendTimeout = new TimeSpan(00, 10, 00);

            binding.AllowCookies = false;
            binding.BypassProxyOnLocal = false;
            binding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
            binding.MaxBufferSize = 567890;
            binding.MaxBufferPoolSize = 524288;
            binding.MaxReceivedMessageSize = 567890;
            binding.MessageEncoding = WSMessageEncoding.Text;
            //binding.TextEncoding= "utf-8";
            binding.TransferMode = TransferMode.Buffered;
            binding.UseDefaultWebProxy = true;

            binding.ReaderQuotas.MaxDepth=2147483647;
            binding.ReaderQuotas.MaxStringContentLength=2147483647;
            binding.ReaderQuotas.MaxArrayLength=2147483647;
            binding.ReaderQuotas.MaxBytesPerRead=2147483647;
            binding.ReaderQuotas.MaxNameTableCharCount=2147483647; 

            string ServiceUrl = "http://localhost:56620/StatementsManagerService.svc";
            System.ServiceModel.EndpointAddress remoteAddress = new System.ServiceModel.EndpointAddress(ServiceUrl);
            PopulateReqProService.StatementsManagerServiceClient Smsc = new PopulateReqProService.StatementsManagerServiceClient(binding, remoteAddress);
            blnReturn = Smsc.MyMethod(MyParam);

But the issue is that when I call the service with lots of data in the parameter, it fails with a protocoleception and in the svclog file I can clearly see the exception as:

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.

Can somebody help? I am not getting any clue.

  • 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-24T23:31:40+00:00Added an answer on May 24, 2026 at 11:31 pm

    You also need to set the values (on your client side binding in code) that you specify in the <ReaderQuotas> section of your web.config!

    binding.ReaderQuotas.MaxDepth = 2147483647;
    binding.ReaderQuotas.MaxStringContentLength = 2147483647;
    binding.ReaderQuotas.MaxArrayLength = 2147483647;
    binding.ReaderQuotas.MaxBytesPerRead = 2147483647;
    binding.ReaderQuotas.MaxNameTableCharCount = 2147483647;
    

    then it should work:

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

Sidebar

Related Questions

I have a WCF service that I am calling from multiple clients. I need
Hi All I am currently having an issue calling a WCF service from a
Scenario: WCF client app, calling a web-service (JAVA) operation, wich requires a complex object
We have a C# client app that communicates to our C# backend service via
I have a Windows program that calling a WCF service. This service after a
I'm testing calling a SOAP based service from a .net client app and am
I have a WCF service and a client, that uses a custom UserNamePasswordValidator for
I have a WCF service that takes in and Id and generates some records.
I'm calling a WCF service from a Silverlight client, therefore making all the calls
When calling a WCF service from Silverlight that works for smaller parameters, but fails

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.