Had the problem that in a WCF I have an base class type as an return type. In the service itself I returned a subtype. The service itself works as expected. The client itself has the problem that an error message „The underlying connection was closed. The connection was closed unexpectedly.“ comes.
The Error itself is nonsense. But the problem itself does make sense. The Object are serialized and sent over the wire and the client expects a certail serialization structure (of the base type, not the subtype). Due to this the client can not deserialize the incoming packet.
This site helped me wading through the error message.