I have a question on the types that can be returned by a WCF service.Are there any specific complex types that can’t be returned by a WCF service? To put more clearly, can we have any kind of complicated datatypes to be defined as Data Contracts and have them returned by the Service operations? Is there any limitation to any type?
Share
Yes – anything that cannot be serialized into a message constrained by a XML schema file.
This includes:
SqlConnectionor something like that)Brushor other drawing elementsThe main point is: whatever you’re trying to send from client to server must be able to be serialized into an XML message, expressed in a XML schema, and deserialized back into a new object