【问题标题】:WF 4.0: FaultException<TDetail> thrown from WCF service gets converted to FaultExceptionWF 4.0:从 WCF 服务抛出的 FaultException<TDetail> 被转换为 FaultException
【发布时间】:2011-05-02 11:05:05
【问题描述】:

WF 4.0 中 WCF 服务抛出的错误异常(即FaultException)正在转换为通用的 FaultException (System.ServiceModel.FaultException)。但是,当我在控制台应用程序或 asp.net 应用程序中使用相同的 WCF 服务时,会抛出正确的错误异常(即 (FaultException))。

在工作流 (4.0) 中,我需要捕获从 WCF 抛出的相同的非通用错误异常 (FaultException)。

有人知道怎么解决吗?

【问题讨论】:

    标签: workflow-foundation workflow-foundation-4


    【解决方案1】:

    您的帖子有点旧,但我遇到了同样的问题。我按照上一个答案的链接,但是我们的解决方案来自this post on msdn

    这与将类型添加到从服务引用生成的 xaml 中有关。问题当然是这涉及手动编辑生成的代码,因此如果服务引用得到更新,更改将被清除。如果我找到解决该问题的方法,我会更新这篇文章。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多