WCF工作流服务 - 如何添加工作流控制端点?

时间:2016-05-23 12:34:17

标签: c# .net wcf workflow-foundation-4 workflowservice

我在VS2012中创建了一个新的WCF工作流服务项目。

最终,我需要的是能够从我的工作流程的实例A终止我的工作流程的实例B.

我可以说,实现这一点的唯一方法是通过Workflow Control Endpoint,但我无法弄清楚如何添加/访问我的项目。

从我所看到的(例如here),添加控制端点,您只需在web.config中的<endpoint>节点添加<service>元素,并使用适当的属性值。问题是..我的web.config中没有<service>元素。 “WCF工作流服务应用程序”项目模板不添加一个。我的web.config在下面。

所以我的问题很简单:从“WCF工作流服务应用程序”项目模板开始,如何添加工作流控制端点?

这些是项目的默认启动设置: default launch settings

的web.config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
  </appSettings>
  <system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.5" >
    </compilation>
    <httpRuntime targetFramework="4.5"/>
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <protocolMapping>
        <add binding="basicHttpsBinding" scheme="https" />
    </protocolMapping>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
</configuration>

1 个答案:

答案 0 :(得分:0)

终于找到了解决方案。请参阅this post

相关问题