WCF large message exception

Posted by Saurabh Lalwani on Stack Overflow See other posts from Stack Overflow or by Saurabh Lalwani
Published on 2010-04-19T16:27:45Z Indexed on 2010/04/19 16:33 UTC
Read the original article Hit count: 315

Hi,

I have a web service which is returning data to the desktop application. The problem I am having is, when the web service returns small volume of data everything works fine but when the volume of data is large it throws the following exception:

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive.

Can it be because it is taking a good 4-5 seconds to fetch all the records from the database and the session times out or something?

Also, when I am debugging the web service, I see that this particular method is called twice and it is also returning the correct value both times, but for some reason the desktop application seems to be throwing the aforementioned exception.

I found similar posts before on stackoverflow but they did not solve my problem. Can anybody please tell me what's going on in here?

Thanks!

© Stack Overflow or respective owner

Related posts about wcf

Related posts about system.net.webexception