在使用SQL实例存储持久化工作流时,出现以下异常。我可以使用SQL实例存储的相同设置在其他应用程序中保留和检索。但是我一直在我的Windows服务应用程序之一中收到此错误。任何人都可以帮助我找到问题的根本原因吗?
异常消息:
名为{urn:schemas-microsoft-com:System.Activities.Persistence / command} SaveWorkflow的InstancePersistenceCommand的执行由于错误而中断。
异常StackTrace:
at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.Activities.WorkflowApplication.IdleEventHandler.OnStage2Complete(IAsyncResult lastResult, WorkflowApplication instance, Boolean isStillSync)
at System.Activities.WorkflowApplication.EventFrame(IAsyncResult result)
内部异常消息
无法序列化数据表。未设置数据表名称。
内部异常StackTrace:
at System.Data.DataTable.WriteXmlSchema(XmlWriter writer, Boolean writeHierarchy)
at System.Data.DataTable.System.Xml.Serialization.IXmlSerializable.WriteXml(XmlWriter writer)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteIXmlSerializable(XmlWriterDelegator xmlWriter, Object obj, XmlSerializableWriter xmlSerializableWriter)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteIXmlSerializable(XmlWriterDelegator xmlWriter, Object obj)
at System.Runtime.Serialization.XmlDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
等...
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
at System.Runtime.Serialization.XmlObjectSerializerWriteContextComplex.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
at WriteKeyValuePairOfXNameanyTypenNMwwVNaToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract )
at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
at System.Runtime.Serialization.NetDataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContract contract, Hashtable surrogateDataContracts)
at System.Runtime.Serialization.NetDataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph)
at System.Runtime.Serialization.XmlObjectSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(XmlDictionaryWriter writer, Object graph)
at System.Activities.DurableInstancing.DefaultObjectSerializer.SerializePropertyBag(Stream stream, Dictionary`2 propertyBag)
at System.Activities.DurableInstancing.GZipObjectSerializer.SerializePropertyBag(Stream stream, Dictionary`2 propertyBag)
at System.Activities.DurableInstancing.DefaultObjectSerializer.SerializePropertyBag(Dictionary`2 value)
at System.Activities.DurableInstancing.SerializationUtilities.SerializePropertyBag(IDictionary`2 properties, InstanceEncodingOption encodingOption)
at System.Activities.DurableInstancing.SaveWorkflowAsyncResult.SerializeAssociatedData(SqlParameterCollection parameters, SaveWorkflowCommand saveWorkflowCommand, StringBuilder commandTextBuilder)
at System.Activities.DurableInstancing.SaveWorkflowAsyncResult.GenerateSqlCommand(SqlCommand command)
at System.Activities.DurableInstancing.SqlWorkflowInstanceStoreAsyncResult.StartOperation()