c# - Why can't I serialize an object using DataContractSerializer? -


I am trying to sort a series using DataContractSerializer and getting an exception below. This is not for any SOA service, but I would still like to use DataContractSerializer if possible. I am using Net 3.5 SP1.

Type 'System.DelegateSerializationHolder + DelegateEntry' with the name of the data contract 'DeliSerializationHolder. Delete Entry: 'Do not know any type of known type in known list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types near the DataContractSerializer.

Can you post the definition of your class?

It seems that you are trying to serialize a class in which there is an area of ​​type rep, which I am sure will mess with the serializer.

Did you create your class with data client / datmail attributes? 3.5 SP1 has a default version for serializer which sorts everything in a class publicly if it is not marked with those attributes. Probably you should clearly mark each asset, which should be serialed with the datamember feature and leave those that should not be.

In addition, we will need to look at the definition of our class for further assistance.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -