Answered by:
Workflow Foundation Error

Question
-
User440671232 posted
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.
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
-
User-417640953 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.
Thanks.
Best Regards!
Wednesday, December 4, 2013 8:30 PM -
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.
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