在.NET的TransactionScope错误?更多信息? [英] TransactionScope bug in .NET? More information?

查看:182
本文介绍了在.NET的TransactionScope错误?更多信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读(或者从同事听说的),在.NET中,TransactionScope的可触及超时,然后VoteCommit(相对于VoteRo​​llback)。这是准确的还是道听途说?我无法追查的谈到这个问题(如果它是一个问题)在网络上的信息,所以我不知道如果任何人有任何与它的直接经验,并能提供一些线索?

I have read (or perhaps heard from a colleague) that in .NET, TransactionScope can hit its timeout and then VoteCommit (as opposed to VoteRollback). Is this accurate or hearsay? I couldn't track down information on the web that talked about this issue (if it IS an issue), so I wonder if anyone has any direct experience with it and can shed some light?

推荐答案

如果您在关系到SQL Server的意思是,再有就是,你可以在连接字符串中解决的问题;看到我的回答<一href="http://stackoverflow.com/questions/189534/net-transactionscope-class-and-t-sql-tran-commit-and-rollback#190332">here,或全部细节here.

If you mean in relation to SQL Server, then there is an issue that you can fix in the connection string; see my reply here, or the full details here.

短的版本是:确保你有事务绑定=显式取消绑定; 连接字符串中的

The short version is: ensure you have Transaction Binding=Explicit Unbind; in the connection string.

这实际上不是在做一个投票提交 - 事务(以及任何运营初期)已回滚,但任何后续操作(仍然在的TransactionScope )可以得到在NUL事务执行的,即自动提交。

It isn't actually doing a vote commit - the transaction (and any early operations) has rolled back, but any subsequent operations (still inside the TransactionScope) can get performed in the nul-transaction, i.e. auto-commit.

这篇关于在.NET的TransactionScope错误?更多信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆