WCF large message exception
- by Saurabh Lalwani
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!