CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2008

    WCF weird behavior. (An error occurred while receiving the HTTP response)

    I'm receiving this weird exception when calling a WCF function that returns a list of items. apparently when the size of list gets bigger this exception is thrown.

    "An error occurred while receiving the HTTP response to http://localhost:8731/WMON/Database/...CeDBWcfService. 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 WCF service functions properly because when the client calls the function, it gets called from the service end point (I tested by placing a break point). Also the service has not shut down because on a multiple attempt of calling the function after the exception is thrown, the service code gets executed (tested using break points again). What could this error be?

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004

    Re: WCF weird behavior. (An error occurred while receiving the HTTP response)

    Increase the maxStringContentLength in the binding.

            <binding name="Wmon.Basic.Binding"
              <readerQuotas maxDepth="32"
                maxNameTableCharCount="16384" />
          <service name="WmonEndpoint"
            <endpoint name="WmonEndpoint.Binding"
              ... />
               <add baseAddress="http://localhost:5071/WmonEndpoint" />
            <behavior name="Wmon.Basic.Behavior">
              <serviceMetadata httpGetEnabled="true" />
              <dataContractSerializer maxItemsInObjectGraph="2147483647" />
              <!-- <serviceDebug includeExceptionDetailInFaults="false"/> -->

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.