다음을 통해 공유


방법: 워크플로 서비스 구성

워크플로 서비스 클라이언트 또는 서비스의 구성은 응용 프로그램 구성 파일을 사용한다는 점에서 WCF(Windows Communication Foundation) 서비스의 구성과 유사합니다. 워크플로 런타임은 서비스에 대한 동작 섹션의 일부로 구성됩니다. 다음 예제에서는 워크플로 런타임을 서비스의 동작으로 추가하여 SqlWorkflowPersistenceService를 추가하는 방법을 보여 줍니다. 워크플로와 관련된 워크플로 런타임 섹션은 굵게 강조 표시됩니다.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

  <system.serviceModel>
    <services>
      <service name="Microsoft.WorkflowServices.Samples.SequentialCalculatorService" behaviorConfiguration="ServiceBehavior" >
        <host>
          <baseAddresses>
            <add baseAddress="https://localhost:8888/ServiceHost/Calculator.svc" />
          </baseAddresses>
        </host>
        
        <endpoint address="" 
                  binding="wsHttpContextBinding" 
                  contract="ICalculator" />
      </service>
    </services>

    <behaviors>
      <serviceBehaviors>
        <behavior name="ServiceBehavior"  >
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <serviceCredentials>
            <windowsAuthentication
                allowAnonymousLogons="false"
                includeWindowsGroups="true" />
          </serviceCredentials>
          <!-- Comment out the following behavior to disable persistence store -->
          <workflowRuntime name="WorkflowServiceHostRuntime" validateOnCreate="true" enablePerformanceCounters="true">
            <services>
              <add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                   connectionString="Data Source=localhost\sqlexpress;Initial Catalog=NetFx35Samples_ServiceWorkflowStore;Integrated Security=True;Pooling=False"
                   LoadIntervalSeconds="1" UnLoadOnIdle= "true" />
            </services>
          </workflowRuntime>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    
  </system.serviceModel>
  
</configuration>

참고 항목

기타 리소스

Configuring Services Using Configuration Files
워크플로 서비스 및 영속 서비스 만들기

Footer image

Copyright © 2007 by Microsoft Corporation. All rights reserved.