在 Biztalk 2010 Orchestration 中捕获 EndpointNotFoundException

发布于 2024-12-28 18:56:49 字数 323 浏览 3 评论 0原文

我想在我的编排中处理 EndpointNotFoundException。

我添加了一个新的异常处理程序

范围synchronized = false

异常对象类型= System.ServiceModel.EndpointNotFoundException(此对象类型不起作用)

异常对象类型= System.ServiceModel.CommunicationException(此对象类型不起作用)

异常对象类型= System.SystemException(此对象类型有效。我不想要)

关于如何在编排中捕获此类异常的任何想法?

I would like to handle an EndpointNotFoundException in my orchestration.

I add a new exception handler

scope synchronized = false

exception object type = System.ServiceModel.EndpointNotFoundException (this object type doesn't work)

exception object type = System.ServiceModel.CommunicationException (this object type doesn't work)

exception object type = System.SystemException (this object type worked. which i don't want)

Any idea on how to catch such exceptions in orchestration ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寒江雪… 2025-01-04 18:56:49

这似乎是一个常见问题 - 例如此处此处。如果我捕获一个基本的 System.Exception ,则我同意您的观点,即捕获的类型是具有内部 System.Net.WebException 的 System.ServiceModel.EndpointNotFoundException 。代码>.

虽然没有直接回答您的问题,但为什么不将端口标记为 Delivery Notation = Translated,然后捕获 DeliveryFailureException

这样,您就可以将编排与特定适配器(WCF)分离,并且如果您更改传输(或添加备份传输等),异常处理仍然有效。

编辑:Scott Colestock提到用于捕获内部异常的黑客 - 类似的东西可能为原来的要求而工作

This seems to be a common issue - e.g. here and here. I concur with you if I catch a basic System.Exception that the type being caught is System.ServiceModel.EndpointNotFoundException with an inner System.Net.WebException.

Although not directly answering your question, why not mark the port as Delivery Notification = Transmitted, and then catch the DeliveryFailureException?.

This way, you decouple your orchestration from the specific adapter (WCF), and if you change your transport (or add a backup transport etc), the exception handling will still work.

Edit : Scott Colestock mentions a hack to catch internal exceptions - something similar might work for the original requirement

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文