IIS中承载的WF4未持久化
我在IIS中托管了一个WF4状态机工作流。我正在尝试添加持久性,并在web.config中添加了以下内容IIS中承载的WF4未持久化,iis,workflow-foundation-4,Iis,Workflow Foundation 4,我在IIS中托管了一个WF4状态机工作流。我正在尝试添加持久性,并在web.config中添加了以下内容 <behaviors> <behavior> <!-- To avoid disclosing metadata information, set the values below to false before deployment --> <serviceMetadata httpGetEnabled=
<behaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
<behavior name="WorkflowPersistence">
<sqlWorkflowInstanceStore
connectionString="Data Source=.\SQLExpress;Initial Catalog=InstanceStore;Integrated Security=True;Async=true"
instanceEncodingOption="GZip"
instanceCompletionAction="DeleteAll"
instanceLockedExceptionAction="AggressiveRetry"
hostLockRenewalPeriod="00:00:30"
runnableInstancesDetectionPeriod="00:00:05" />
<workflowIdle timeToPersist="00:00:05" timeToUnload="00:00:30"/>
</behavior>
</behaviors>
在工作流初始操作的SendReplyToReceive上,我还将PeristBeforeSend属性设置为true。调用初始操作后,InstanceTable中不会保留任何内容。我还让工作流处于空闲状态,也没有任何内容被持久化。事件日志中没有异常或条目。所有服务操作都正常运行。我可以从头到尾运行工作流,没有错误
我还将连接字符串中的数据源属性的值设置为我知道在尝试连接时获取Sql异常无效的值,但仍然无效。因此,它要么在默默地失败方面做得很好,要么持久性根本不起作用。我可能遗漏了一些简单的东西-有什么想法吗?问题在于行为集合中的额外行为元素。我删除了第二个行为(名为WorkflowPersistence),并将其内容放在第一个行为中。然后持久性开始工作。问题在于行为集合中的额外行为元素。我删除了第二个行为(名为WorkflowPersistence),并将其内容放在第一个行为中。然后,坚持开始起作用