Configuring WorkflowServiceHost web.config

I have created a WF4 WorkflowServiceHost application. I need to change some of the binding attributes, but there is no binding information in the web.config. WCF 3.5 apps I'm used to dealing with generate this automatically in the config, but I don't know where WF4 keeps its settings. The service runs fine and exposes a http endpoint. How do I customise the binding info? And how can I see what the default values being used are? I just need to tweak the readerQuotas.The auto-generated web.config looks like this:

<?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>

WorkflowServices can use binding elements but typically just rely on the defaults. In your config, the element defines the default behavior that will be used by your workflow service.

If you want to create a tag for a Workflow Service I described the process in the second half of How to eliminate tempuri.org from your service WSDL

链接地址: http://www.djcxy.com/p/95874.html

上一篇: 使用net.msmq绑定激活使用MSMQ的IIS托管工作流

下一篇: 配置WorkflowServiceHost web.config