How to connect to an AppFabric WorkflowControlEndpoint?

Locked How to connect to an AppFabric WorkflowControlEndpoint?

  • 2010年9月13日 0:44
     
      コードあり

    Hi,

     

    Besides using AppFabric's Dashboard to monitor/control workflows, I also have the requirement of doing so from my WCF application. The easiest thing I could think of was to simple use the WorkflowControlEndpoint that AppFabric already exposes for a given .xamlx; however, I can't get this to work.

     

    Example:

    1. My service is located here... http://localhost/WorkflowService/Service1.xamlx and instancing control from the AppFabric Dashboard works perfectly
    2. I'm hosting my service with IIS 7.5 and my web.config contains nothing but the default entries created by AppFabric and the VS2010 template
    3. The Endpoints dashboard shows the workflowControlEndpoint with Service Virtual Path /WorkflowService/Service1.xamlx , using netNamedPipeBinding , etc.
    4. I'm using this code from the client:
    WorkflowControlEndpoint controlEndpoint = new
    
     WorkflowControlEndpoint(
      new
    
     NetNamedPipeBinding(),
      new
    
     EndpointAddress(new
    
     Uri("net.pipe://localhost/WorkflowService/Service1.xamlx"
    
    )));
    
    WorkflowControlClient controlClient = new
    
     WorkflowControlClient(controlEndpoint);
    				controlClient.Suspend(Guid.Parse([<em>whateverWorkflowId</em>
    ]));
    


    ... and I get this error:

     

    The message with Action 'http://schemas.datacontract.org/2008/10/WorkflowServices/IWorkflowInstanceManagement/Suspend'
    
    <br/>
    cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. <br/>
    This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security <br/>
    mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding <br/>
    (including security requirements, e.g. Message, Transport, None).
    

     

    I've tried with and without security in the binding but it still fails

    Please let me know if you need more details about my app

    Thanks

すべての返信

  • 2010年9月13日 23:22
     
     
    No one ??
  • 2010年10月26日 16:26
     
      コードあり

    Try this for your named pipe binding

     

    Binding myBinding = new NetNamedPipeBinding
    {
      TransactionFlow = true,
      Security = new NetNamedPipeSecurity
      {
        Mode = NetNamedPipeSecurityMode.Transport,
        Transport = new NamedPipeTransportSecurity
        {
          ProtectionLevel = ProtectionLevel.Sign
        }
      }
    };
    

     

  • 2010年12月6日 22:30
     
     

    I have a similar problem - get the exact same error. Did anyone get this to work?

    The workflow is running under AppFabric. I also tried what Stuart proposed but still no joy.

     

  • 2010年12月7日 0:48
     
     回答済み

    This is resolved. I turned on diagnostics tracing and looks like it was listening on net.pipe://{hostname}/workflow.xamlx/System.ServiceModel.Activities_IWorkflowInstanceManagement 

    Also make sure the account under which your application is running has necessary permissions to call the management endpoint.

     

     

     

  • 2011年2月11日 14:59
     
     

    Hi,

     

    By doing that, I get an error message when trying to call the Cancel() command

    The message with To  'net.pipe://localhost/MyService.xamlx/System.ServiceModel.Activities.IWorkflowInstanceManagement' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher.  Check that the sender and receiver's EndpointAddresses agree.

    Have you had this issue ? Do you know what Uri to use not to fall in the the "Address Filter" rejection ?

     

  • 2011年11月1日 18:03
     
     

    Evne though i can see the system endpoints if i remove the filter from appfabric i am getting this message

     

    There was no endpoint listening at

    net.pipe://localhost/Service1.xamlx/System.ServiceModel.Activities_IWorkflowInstanceManagement that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

    I also get it at 

    net.pipe://localhost/Service1.xamlx/System.ServiceModel.Activities.IWorkflowInstanceManagement that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

     

    As ythe first guy who posted used an underscore the second used a . between activities and iworfklow....

    Either one i use its not finding it.

     

    Any idea?

     

    Thanks

     

     

  • 2011年11月2日 9:42
     
     

    Hi,

    I solved the issue by adding, in a web.config file located at the same level than the XAMLX service, the lines

    <system.serviceModel>
        <services>
         <service name="Service_1b2fb7c88de540209251bad8cbac6f89">
            <endpoint address="wce" binding="wsHttpBinding" kind="workflowControlEndpoint" />
          </service>
        </services>
    </system.serviceModel>

    By doing this, I explicitely declare a control endpoint for the XAMLX service

  • 2011年11月16日 16:08
     
     

    Hi,

    I solved the issue by adding, in a web.config file located at the same level than the XAMLX service, the lines

    <system.serviceModel>
        <services>
         <service name="Service_1b2fb7c88de540209251bad8cbac6f89">
            <endpoint address="wce" binding="wsHttpBinding" kind="workflowControlEndpoint" />
          </service>
        </services>
    </system.serviceModel>

    By doing this, I explicitely declare a control endpoint for the XAMLX service


    And what does that number behind "Service_" mean?