I am using visual studio 2010, .net 4.0 , WF 4.0
I am trying to persist a workflow in sql database using SqlWorkflowInstanceStore
But the persistence of workflow hangs the application as the SqlWorkflowInstanceStore is unable to serialize few type used in the workflow.
Some of them to mention are-
• DataRow of a typed in dataset
As I understand, the NetDataContractSerializer is used to serialize the variable, arguments in workflow.
NetDataContractSerializer could not serialize the XMLDocument and data row.
I want them to persist, how to serialize them using NetDataContractSerializer? how can I do that?
Also, if I want to ignore some arguments while persisting, how can I do that?
- Adding XMLIgnore, NonSerializable attributes do not work
Type 'System.Xml.XmlDocument' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types.