我正在尝试使用 web.config 复制以下功能,因为我使用的是网络服务器托管的 .xamlx 服务
host.WorkflowExtensions.Add(new HiringRequestInfoPersistenceParticipant());
我已经从能够收集的搜索结果中尝试了以下内容,但并不满意。
<extensions>
<behaviorExtensions>
<add name="sqlTracking"
type="ApprovalService.Persistence.HiringRequestInfoPersistenceParticipant, ApprovalService.Persistence" />
</behaviorExtensions>
</extensions>
任何帮助将不胜感激。
这是我更新的 web.config
<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="sqlTracking"
type="ApprovalService.HiringInfoElement, ApprovalService"/>
</behaviorExtensions>
</extensions>
<services>
<service name="ApprovalService" behaviorConfiguration="ApprovalServiceBehavior">
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ApprovalServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="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" />
<sqlWorkflowInstanceStore connectionStringName="WorkflowPersistence" />
<workflowIdle timeToPersist="0" timeToUnload="0:05:0"/>
<sqlTracking/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
这一切都编译并运行,但自定义持久性对象永远不会被调用。