WF4.0 Persistence- NetDataContractSerializer cannot serialize XMLDocument, DataRow etc.

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
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-
<ol>

XMLDocument DataRow of a typed in dataset
</ol>
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?
<span> how can I do that?
Also, if I want to ignore some arguments while persisting, how can I do that?
<p style="text-indent:-18pt <span style="color:#2b91af; font-family:Consolas; font-size:9.5pt <span>-<span style="font:7pt/normal Times New Roman
Adding XMLIgnore, NonSerializable attributes do not work
Error is-
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.
<span lang="EN-GB" style="color:#8f8f8f Regards,
<span lang="EN-GB" style="color:#8f8f8f Vani <span>. <hr class="sig From my thread on MSDN

View the full article
 
Back
Top