配置WorkflowServiceHost web.config

时间:2011-07-28 16:37:11

标签: .net wcf workflow workflow-foundation-4

我创建了一个WF4 WorkflowServiceHost应用程序。我需要更改一些绑定属性,但web.config中没有绑定信息。我习惯处理的WCF 3.5应用程序在配置中自动生成,但我不知道WF4在哪里保留其设置。该服务运行正常并公开了一个http端点。如何自定义绑定信息?我怎样才能看到使用的默认值是什么?我只需要调整readerQuotas。自动生成的web.config看起来像这样:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <connectionStrings>
    <add name="formContainer" connectionString="metadata=res://*/form.csdl|res://*/form.ssdl|res://*/form.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=172.16.40.13;Initial Catalog=TestDB;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
  <system.web>
<compilation debug="true" targetFramework="4.0" />
  </system.web>
 <system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior>
      <!-- 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="true"/>   

          <sqlWorkflowInstanceStore     
           connectionString="Data Source=localhost;Initial Catalog=WorkflowInstanceStore;Integrated Security=True;Async=true"
           instanceEncodingOption="None"
           instanceCompletionAction="DeleteAll"
           instanceLockedExceptionAction="NoRetry"
           hostLockRenewalPeriod="00:00:30"
           runnableInstancesDetectionPeriod="00:00:05"/>           
      </behavior>
  </serviceBehaviors>
</behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />    
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>   
  </system.webServer>  
</configuration>

1 个答案:

答案 0 :(得分:1)

WorkflowServices可以使用绑定元素,但通常只依赖于默认值。在您的配置中,该元素定义了工作流服务将使用的默认行为。

如果要为工作流服务创建标记,我在How to eliminate tempuri.org from your service WSDL的后半部分描述了该过程