开发者

How to pass Workflow service exception to client

开发者 https://www.devze.com 2023-03-17 16:49 出处:网络
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 bl

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

精彩评论

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