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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:57:46+00:00 2026-05-29T22:57:46+00:00

I’ve got a WCF service that I’ve written in C# which passes to the

  • 0

I’ve got a WCF service that I’ve written in C# which passes to the caller (a C# WPF application) a collection of instantiated objects. Works great, however if the collection I’m returning has too many objects, the call fails on the client side after about 10 seconds with a generic exception (which itself contains a series of generic inner exceptions). Here is the exception and inner exceptions:

{“An error occurred while receiving the HTTP response to http://myserver/MyAppService/MyAppService.svc. This could be due to
the service endpoint binding not using the HTTP protocol. This could
also be due to an HTTP request context being aborted by the server
(possibly due to the service shutting down). See server logs for more
details.”}
{“The underlying connection was closed: An unexpected error occurred on a receive.”}
{“Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.”}
{“An existing connection was forcibly closed by the remote host”}

The issue is 100% reproduceable and is definitely related to the size of the collection, and not the content. I know this because if I break up the single collection in to multiple smaller collections and pass those back one at a time, it works fine. Only when they’re all together and the collection is to large is it a problem.

I tried increasing the maxReceivedMessageSize property on the client side’s app.config file to 2147483647 but the error still persists. Also tried increasing the timeout period, but no affect. Here are the properties in the app.config file. I’ve tried increasing pretty much every number below to 2147483647 and tried changing maxBufferPoolSize to 0, but no luck:

<bindings>
  <basicHttpBinding>
    <binding name="BasicHttpBinding_iMyAppService" 
         closeTimeout="01:00:00" openTimeout="01:00:00" 
         receiveTimeout="01:00:00" sendTimeout="01:00:00"
         allowCookies="false" bypassProxyOnLocal="false" 
         hostNameComparisonMode="StrongWildcard"
         maxBufferSize="2147483647" maxBufferPoolSize="524288" 
         maxReceivedMessageSize="2147483647"
         messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
         useDefaultWebProxy="true">
      <readerQuotas 
           maxDepth="32" maxStringContentLength="8192" 
           maxArrayLength="16384" maxBytesPerRead="4096" 
           maxNameTableCharCount="16384" />
      <security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None"
          realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
    </binding>
  </basicHttpBinding>
  <wsHttpBinding>
    <binding name="WSHttpBinding_iMyAppService" 
         closeTimeout="00:01:00" openTimeout="00:01:00" 
         receiveTimeout="00:10:00" sendTimeout="00:01:00"
         bypassProxyOnLocal="false" transactionFlow="false" 
         hostNameComparisonMode="StrongWildcard"
         maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
         messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
         allowCookies="false">
      <readerQuotas 
           maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
           maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <reliableSession ordered="true" inactivityTimeout="00:10:00"
        enabled="false" />
      <security mode="Message">
        <transport clientCredentialType="Windows" proxyCredentialType="None"
          realm="" />
        <message clientCredentialType="Windows" negotiateServiceCredential="true"
          algorithmSuite="Default" />
      </security>
    </binding>
  </wsHttpBinding>
</bindings>
<client>
  <endpoint name="CurrencyConvertorSoap" 
      address="http://www.webservicex.net/CurrencyConvertor.asmx"
      binding="basicHttpBinding" 
      bindingConfiguration="CurrencyConvertorSoap"
      contract="CurrencyConverterService.CurrencyConvertorSoap" />

  <endpoint name="CurrencyConvertorSoap12" 
      address="http://www.webservicex.net/CurrencyConvertor.asmx"
      binding="customBinding" 
      bindingConfiguration="CurrencyConvertorSoap12"
      contract="CurrencyConverterService.CurrencyConvertorSoap" />

  <endpoint name="WSHttpBinding_iMyAppService"
      address="http://myserver/MyAppService/MyAppService.svc"
      binding="wsHttpBinding" 
      bindingConfiguration="WSHttpBinding_iMyAppService"
      contract="MyAppService.iMyAppService" >
    <identity>
      <dns value="localhost" />
    </identity>
  </endpoint>

  <endpoint name="BasicHttpBinding_iMyAppService" 
      address="http://myserver/MyAppService/MyAppService.svc"
      binding="basicHttpBinding" 
      bindingConfiguration="BasicHttpBinding_iMyAppService"
      contract="MyAppService.iMyAppService" />
</client>

What else could I change or add to make this work?

Thanks!

  • 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-29T22:57:48+00:00Added an answer on May 29, 2026 at 10:57 pm

    It could be maxitemsinobjectgraph. Enable the wcf trace, you should see a stack trace in there.

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

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I would like to run a str_replace or preg_replace which looks for certain words

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.