Rory Primrose

Learn from my mistakes, you don't have time to make them yourself

View project on GitHub

WCF and large messages

Posted on December 5, 2006

I am getting some interesting results when messages are returned from a WCF service. Small responses come through fine. When the responses start to get large, I run into the QuotaExceededException exception. This is fine because you can increase the MaxReceivedMessageSize configuration value on the client endpoint. This starts to fail when the size of the data continues to increase and eventually I get the exception WebException: The underlying connection was closed: The connection was closed unexpectedly__.

The service call is still being made (I can debug it), but it seems that the error is coming back quick enough that it is a problem with the server endpoint, rather than client endpoint or configuration on the client.

Anyone come across this before???