Reputation: 8239
I'm new here and I hope anyonte can help me.
I have WCF Service and Windows Forms working with this client written in VB.NET. The Service class started to return xml serialized objects, but all my classes on Service side are DataContract-s and the service class is DataContractFormat. I googled everywhere about serializations and I couldn't find reason why it started to do that.
I checked my classes and service, app.config file, but I couldn't find anything.
I checked Reference.vb class, and it's System.Xml.Serialization.XmlElementAttribute everywhere. The question may seem dummy, but I really don't know what to do. I just want to know what can cause the service to act like that.
Thank you.
Upvotes: 2
Views: 3051
Reputation: 754598
So I assume you didn't knowingly change to using the XmlSerializer then, did you?
There are a number of circumstances when the WCF runtime decides to use the XmlSerializer instead of the DataContractSerializer, but typically, that's when you have an existing WSDL/XSD that contain certain elements that the DataContractSerializer can't deal with.
Did you check your Reference.vb
class - often, the Add Service Reference
function in Visual Studio will add comments into the generated file to explain why it switched to the XML serializer. Does it say anything at all??
Upvotes: 3