【发布时间】:2015-11-26 03:52:24
【问题描述】:
我有一个工作流服务。我还在该服务中使用工作流持久性。但是在 IIS 中部署工作流后,我在服务器上的日志文件中从客户端向工作流服务发出请求。我看到一条消息
The execution of the InstancePersistenceCommand named {urn:schemas-microsoft-com:System.Activities.Persistence/command}SaveWorkflow was interrupted by an error.InnerException Message: Type 'System.ServiceModel.Channels.ReceivedFault' 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.
我尝试对此异常进行研究,但没有找到任何东西。
如何解决这个问题?或者让我知道上述异常的原因是什么?
【问题讨论】:
-
您是否尝试过错误消息提示的内容?
-
工作流服务中的每个服务方法,我都有try catch,但我没有从中得到任何东西。
-
你看,你的一个类型暴露了一个'System.ServiceModel.Channels.ReceivedFault'类型的属性,它不能被序列化,因为这个类没有用DataContractAttribute属性标记,所以它不能被序列化.所以将该属性标记为忽略。
标签: wcf workflow workflow-foundation-4 workflowservice