Reputation: 6793
there is a data contract (say, EmployeeView
) in my WCF service. I have decorated it with Serializable
attribute, and all members are marked as DataMember
A method in the WCF is returning List<EmployeeView>
.
When I execute this method through WCF Test client or MVC app, it gets executed successfully, but while transferring result it is giving an error of The underlying connection was closed: The connection was closed unexpectedly
. Is List<EmployeeView>
not serialized though EmployeeView
is marked as serialized?
Further to add, if I execute an OperationContract returning only "EmployeeView" it gives me different error saying, The service is offline or inaccessible; the client-side configuration does not match the proxy
This is making things strange, because other operations returning string, etc are working fine
Upvotes: 0
Views: 94
Reputation: 311048
No. It depends on whether the concrete implementation of List is Serializable.
You also need to stop using the terms 'serialized' and 'Serializable' as though they mean the same thing. They don't.
Upvotes: 2