Gettin error like this System.Runtime.Serialization.InvalidDataContractException.... If anyone know please reply here

System.Runtime.Serialization.InvalidDataContractException: Type ‘System.Text.UTF8Encoding+UTF8EncodingSealed’ cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required. at System.Activities.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.Activities.WorkflowApplication.CompletedEventHandler.OnStage2Complete(IAsyncResult lastResult, WorkflowApplication instance, Boolean isStillSync)
at System.Activities.WorkflowApplication.EventFrame(IAsyncResult result)

Thanks in advance

I got the solution, it was because i used MailMessage datatype in scope where wait for document validation activity was there.
Friends please don’t use variables other than these -->> * All variables used in the scope of a long-running activity must be serializable. Types of variables listed in this page are serializable: Text, True or False, Number, Array, Date and Time. Data Table and GenericValue variables.
for more understanding refer below link.

https://docs.uipath.com/studio/standalone/2023.4/user-guide/orchestration-process#best-practices

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.