locked
Workflow Foundation Error RRS feed

  • Question

  • User440671232 posted

    WF

    Currently, I have a Workflow Foundation Project, but when I tried to debug and execute with WCF Test Client, it resulted an error specified above. I'm using State Machine with Start, 1 State, and Final State. How to fix this error?

    Thanks in advance.

    Monday, December 2, 2013 2:47 AM

Answers

  • User440671232 posted

    Hi jazzyhacker,

    Thanks for your post.

    Based on your description and screenshot, I see you come across below error message when test your WCF service in client side.

    "WCF Test Client : Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata".

    According to the error message, I think you should add a metadata exchange (mex) endpoint to your service.

    <services>
       <service name="MyService.MyService" behaviorConfiguration="metadataBehavior">
          <endpoint
              address="http://localhost/MyService.svc"
              binding="customBinding" bindingConfiguration="jsonpBinding"
              behaviorConfiguration="MyService.MyService"
              contract="MyService.IMyService"/>
          <endpoint
              address="mex"
              binding="mexHttpBinding"
              contract="IMetadataExchange"/>
       </service>
    </services>

    For more information, please check below link.

    http://msdn.microsoft.com/en-us/library/ms731317.aspx

    There are similar issues with solutions below.

    http://stackoverflow.com/questions/7889115/wcf-test-client-failed-to-add-a-service-service-metadata-may-not-be-accessibl

    http://stackoverflow.com/questions/5199541/failed-to-add-a-service-service-metadata-may-not-be-accessible-make-sure-your

    Thanks.

    Best Regards!

     

    Hi Fuxiang, Thanks for your answer, Actually I've found out the answer, I'm using state machine without any messaging activity (send-reply), therefore there is no code generated for service operation, after I added Send-Receive messaging, the workflow service worked properly.

    Thanks in advance.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 4, 2013 9:05 PM

All replies