Click here to Skip to main content
13,053,345 members (57,665 online)
Rate this:
Please Sign up or sign in to vote.
I am using WCF Services in my WPF project. I have a large amount of data, about 847000 records in table. this exception is throwed on client side

proxy.ServicesClient client = new proxy.ServicesClient();
var result = client.GetCustomers(); // here throws ('ComunicationException was unhandled by user code: The underlying connection was closed: The connection was closed unexpectedly.')

In my app.config
<?xml version="1.0" encoding="utf-8" ?>
          <binding name="BasicHttpBinding_IServices" closeTimeout="00:10:00"
              openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
              maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
            <security mode="None" />
            <endpoint address="http://localhost:5302/WpfStoreService.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IServices"
                contract="proxy.IServices" name="BasicHttpBinding_IServices" />

In Web.Config
<?xml version="1.0"?>
    <add name="AdventureWorksLTConnectionString" connectionString="Data Source=.;Initial Catalog=AdventureWorksLT;Integrated Security=True" />
    <compilation debug="true" targetFramework="4.0" />
        <binding name="BasicHttpBinding_IServices" receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00"
          <readerQuotas maxDepth="128"
                        maxNameTableCharCount="2147483647" />
          <security mode="None"/>
          <serviceMetadata httpGetEnabled="True" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <modules runAllManagedModulesForAllRequests="true"/>

Did you have this problem on WCF Services?
Posted 25-Mar-13 23:59pm
Sider89 26-Mar-13 8:15am
Any ideas?
Member 10344050 5-Nov-13 1:01am
even if it is having lesser than 200 records it is showing the same error
Sider89 27-Mar-13 3:49am
Note: It dose not work with large amount of data. In this case I have about 847 000 records in table. It works with small data perfectly(with about 5000 - 6000 records)

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

yes i have this problem but didnt have solution....?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 7 Nov 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100