配置 WorkflowServiceHost web.config
我创建了一个 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="Data Source=172.16.40.13;Initial Catalog=TestDB;Integrated Security=True;MultipleActiveResultSets=True"" 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>
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="Data Source=172.16.40.13;Initial Catalog=TestDB;Integrated Security=True;MultipleActiveResultSets=True"" 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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WorkflowServices 可以使用绑定元素,但通常仅依赖于默认值。在您的配置中,该元素定义工作流服务将使用的默认行为。
如果您想为工作流服务创建标签,我在如何从您的服务 WSDL 中删除 tempuri.org
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