本文介绍了跨 basicHttpBinding 的事务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前有一个 asmx webservice,它公开了一个方法来对 Sql 数据库进行各种更新,内部包装在 SqlTransaction 中.

we currently have an asmx webservice which exposes a single method to make various updates to a Sql database, wrapped internally in a SqlTransaction.

我正在 WCF 中重写此服务,我们希望将现有方法拆分为通过各种不同 WCF 服务访问的子调用.在服务上使用 basicHttpBinding 有一个限制,这排除了所有内置的 WCF 事务功能.是否可以采用这种架构并在多个服务调用之间维护事务?有人建议将 WS-TRANS 作为一种可能的解决方案,但我不熟悉它,这行得通吗?

I am re-writing this service in WCF and we would like to split up the existing method into sub-calls accessed through various different WCF services. There is a restriction to use basicHttpBinding on the services, which rules out all the built-in WCF transaction features. Is it possible to go with this architecture and maintain a transaction across multiple service calls? WS-TRANS has been suggested as a possible solution but I'm not familiar with it, would this work?

推荐答案

白手起家的情况很少见.basicHttpBinding 和 wsHttpBinding 的主要区别在于后者支持 WS-* 协议.

It's very rare that you get something for nothing. The chief difference between basicHttpBinding and wsHttpBinding is that the latter supports the WS-* protocols.

basicHttpBinding 或多或少地为您提供了 ASMX 所拥有的东西.交易"将比您使用 ASMX 时多得多.

basicHttpBinding gives you what you had with ASMX, more or less. "transactions" would be much more than you had with ASMX.

这篇关于跨 basicHttpBinding 的事务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 14:53