开发者

How to pass Workflow service exception to client

I am using a WC开发者_C百科F Workflow service application (DeclarativeServiceLibrary). I have a Windows Forms client talking to the workflow service. I am able to handle known errors using TryCatch blocks. But in case the program meets any unknown exception and comes to the catch block, I want to return a Generic message to the client. Could anybody help me in achieving this?


We have a sample that demonstrates this for WCF Services and WorkflowServices check it out.

  • WCF / WF Service Fault and Validation Example


If the exception is caught within the workflow, then you should use a SendReply activity that provides the fault exception. Your service contract also needs to define the fault contract otherwise the exception received on the client will fault the channel.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜