This goes into the app.config file on the client...
Main Topics
Browse All TopicsI am using WCF service to fetch recordsets and it returns some two thousand records, when its coming back to proxy/UI layer it throws an error:
The underlying connection was closed: The connection was closed unexpectedly
Please sugguest what to do for this. Also it was working with some less data like 100-200 records.
I have enlosed the Web.config section for my App and Service layer
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi again,
I forgot you have to put this into the web.config on the service side '<dataContractSerializer maxItemsInObjectGraph="214
See below
<behavior name="Services.BookingBeha
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFa
<dataContractSerializer maxItemsInObjectGraph="214
</behavior>
If that still does not work you can turn on WCF Logging and Tracing to see if you can track down the error that way?
If you Open your service config 'Web.Config' and 'App.Config' files in Service Configuration Editor (SvcConfigEditor.exe) and turn on Logging and Tracing from the Diagnostics node you may be able to get some more information on your exact error.
Cheers,
Darren
HI there
We have a very large application based on web services, though .net 2.0. This error occurs with us when the http keep alive in IIS was too small, or a proxy server is closing the tcp connection or http connection too soon.
Do you have other services running whcih work? It seems strange to me that you get this particular one that gets disconnected based on the type of data it was returning. I suspect it may be something to do with the data link between your client and server rather than an application problem.
Does the service take a long time ot execute?
Does the service fail every time you try and use it or just periodically?
Do you have some code examples of your service to look at?
many thanks
Jamie
Business Accounts
Answer for Membership
by: DarrenDPosted on 2009-09-22 at 06:07:38ID: 25392325
Hi,
I had a similar problem but it occurred when returning an array list of custom objects.
Just a thought...
Darren
Select allOpen in new window