&引用;System.Workflow.Runtime.Hosting.PersistenceException“;自定义SharePoint顺序工作流
对于具有自定义活动的sharepoint Visual Studio顺序工作流,sharepoint日志中出现以下错误 自定义活动是通过组件类创建的 我不知道为什么会出现这个错误?请帮忙&引用;System.Workflow.Runtime.Hosting.PersistenceException“;自定义SharePoint顺序工作流,sharepoint,sharepoint-workflow,workflow-activity,custom-activity,sequential-workflow,Sharepoint,Sharepoint Workflow,Workflow Activity,Custom Activity,Sequential Workflow,对于具有自定义活动的sharepoint Visual Studio顺序工作流,sharepoint日志中出现以下错误 自定义活动是通过组件类创建的 我不知道为什么会出现这个错误?请帮忙 System.Workflow.Runtime.Hosting.PersistenceException: Type 'System.ComponentModel.Container' in Assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKe
System.Workflow.Runtime.Hosting.PersistenceException: Type 'System.ComponentModel.Container' in Assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable. ---> System.Runtime.Serialization.SerializationException: Type 'System.ComponentModel.Container' in Assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable. at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() at System.Runtime.Serialization.Formatters.Binary.WriteObjectInf... 3d93366f-a701-476c-91c9-d2153911486b
03/22/2012 12:38:36.31* w3wp.exe (0x049C) 0x1620 SharePoint Foundation Workflow Infrastructure 98d4 Unexpected ...o.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph) at System.Workflow.ComponentModel.Activity.Save(Stream stream, IFormatter formatter) at System.Workflow.Runtime.Hosting.WorkflowPersistenceService.GetDefaultSerializedForm(Ac... 3d93366f-a701-476c-91c9-d2153911486b
03/22/2012 12:38:36.31* w3wp.exe (0x049C) 0x1620 SharePoint Foundation Workflow Infrastructure 98d4 Unexpected ...tivity activity) at Microsoft.SharePoint.Workflow.SPWinOePersistenceService.SaveWorkflowInstanceState(Activity instanceState, Boolean unlock) at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation) --- End of inner exception stack trace --- at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation) at System.Workflow.Runtime.WorkflowExecutor.ProtectedPersist(Boolean unlock) 3d93366f-a701-476c-91c9-d2153911486b
谢谢 您可以访问工作流的源XAML吗?查看是否包含“容器”对象,以及是否有必要将其放在那里。如果您可以删除它,并且工作流仍然正常运行,这可能会解决问题。问题是因为当我将组件类更改为顺序活动时,我有活动属性,例如“A”和“B”。然后我将此活动添加到VS工具箱中。在这个阶段,它工作得很好 现在,当我更改活动代码以将其属性更改为“A”和“C”时,我还删除了一个参数为“Container”对象的构造函数 当我重新编译此活动并刷新其DLL时。在工作流设计器中,活动未得到刷新,即其工具箱仍指向旧dll 要解决此问题,我关闭并再次打开VS,瞧,设计师现在正在使用新属性更新活动 我认为这是VS工具箱的局限性,即尽管活动的dll已更新,但它仍无法刷新 谢谢