0

IISでホストされるWindowsWorkflow4サービスを作成しようとしています。私は以下のようにサービスを構成しました

<system.serviceModel>
    <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"/>
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>

サービスは持続しません!値のカスタム永続化など、サービスには魔法のようなものは何もありません。カスタム永続化メソッドを備えた別のサービスで動作させていますが、違いがわかりません。

おそらく私のサービスはエラーになっていますが、デバッグに踏み込む方法も理解できないようです。

どんな助けでも大歓迎です!

4

1 に答える 1

0

サービス要素の名前とSQL接続文字列が正しいと仮定すると、ワークフローはアイドル状態になるとすぐに持続するはずです。アイドル状態になるようにDelayアクティビティを追加しようとしましたか、それとも永続化するためにPersistアクティビティを追加しようとしましたか?

追跡またはトレースを追加して、何が起こっているかを確認してください。何かのようなもの

<system.diagnostics>
  <sources>
    <source name="System.Activities"
            switchValue="Verbose">
      <listeners>
        <add name="textListener"
             type="System.Diagnostics.TextWriterTraceListener"
             initializeData="MyTraceLog.txt"
             traceOutputOptions="ProcessId, DateTime" />
      </listeners>
    </source>
  </sources>
</system.diagnostics>
于 2011-12-07T08:14:30.973 に答える