locked
Control Endpoint Can't be fund. RRS feed

  • Question

  • I created a wcf workflow service application(.xamlx) and hosted it on iis8. I added a control endpoint in web.config. And i used a windows form application client to call workflow service to create a instance, then i wanted to cancel the instance. It was always fail. The error message is: "System.ServiceModel.EndpointNotFoundException: The message with To 'http://localhost:801/DocsReviewWithCancellation.xamlx/Cancel' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher.  Check that the sender and receiver's EndpointAddresses agree."

    Here is my server configuration:

    <system.serviceModel>
        <bindings>
          <basicHttpBinding>
            <binding name="NormalBinding" />
          </basicHttpBinding>
        </bindings>
        <services>
          <service name="DocsReviewService">
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
            <endpoint address="" 
                      binding="basicHttpBinding"
                      bindingConfiguration="NormalBinding"/>
            <endpoint address="Cancel"
                      binding="basicHttpBinding"
                      bindingConfiguration="NormalBinding"
                      contract="System.ServiceModel.Activities.IWorkflowInstanceManagement"
                      kind="workflowControlEndpoint"/>
            <host>
              <baseAddresses>
                <add baseAddress="http://localhost:801/DocsReviewWithCancellation.xamlx"/>
              </baseAddresses>
            </host>
          </service>
        </services>
        <behaviors>
          <serviceBehaviors>
            <behavior>
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true"/>
              <sqlWorkflowInstanceStore connectionString="Data Source=localhost;Initial Catalog=WF4;Integrated Security=False;User ID=sa;Pwd=Aa-123456;"
                instanceLockedExceptionAction="AggressiveRetry" />
              <workflowIdle timeToUnload="00:00:00"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
        <protocolMapping>
          <add scheme="http"  binding="basicHttpBinding"/>
        </protocolMapping>
      </system.serviceModel>

    And my client configuration is still simple:

      <system.serviceModel>
        <bindings>
          <basicHttpBinding>
            <binding name="NormalBinding" />
          </basicHttpBinding>
        </bindings>
        <client>
          <endpoint address="http://localhost:801/DocsReviewWithCancellation.xamlx"
                    binding="basicHttpBinding" 
                    bindingConfiguration="NormalBinding"
                    contract="Service1"/>
          <endpoint address="http://localhost:801/DocsReviewWithCancellation.xamlx/Cancel"
                    binding="basicHttpBinding"
                    bindingConfiguration="NormalBinding"
                    name="Control"
                    contract="System.ServiceModel.Activities.IWorkflowInstanceManagement"/>
        </client>
       </system.serviceModel>

    And here is my client call code:

    WorkflowControlClient controlClient = new WorkflowControlClient("Control");
    controlClient.Cancel(new Guid(instanceid));
    Could anyone point me out what's wrong? Any reply will be appreciated.


    • Edited by Ke Gao Tuesday, May 21, 2013 1:29 AM
    Friday, May 17, 2013 8:59 AM

Answers

All replies

  • Hi,

    Check this thread: http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/b5ae495b-f5fb-4eed-ae21-2b2280d4fec3


    Regards,
    Christian HL
    Microsoft Online Community Support


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    • Marked as answer by Ke Gao Wednesday, May 22, 2013 1:22 AM
    Tuesday, May 21, 2013 9:27 AM
  • Thanks for reply, i'v figured out that i set the wrong contract name and service name in web.config.

    Thanks again.

    Wednesday, May 22, 2013 1:21 AM