TransactionScope bug in .NET? More information?(.NET 中的 TransactionScope 错误?更多信息?)
问题描述
我已经读到(或者可能从同事那里听说)在 .NET 中,TransactionScope 可以达到超时,然后是 VoteCommit(而不是 VoteRollback).这是准确的还是道听途说的?我无法在网络上找到有关此问题的信息(如果它是一个问题),所以我想知道是否有人对此有任何直接的经验并且可以提供一些启发?
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 相关,那么您可以在连接字符串中修复一个问题;在此处查看我的回复,或完整的细节 这里.
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.
简短版本是:确保您在连接字符串中有Transaction Binding=Explicit Unbind;
.
The short version is: ensure you have Transaction Binding=Explicit Unbind;
in the connection string.
它实际上并没有进行投票提交 - 事务(和任何早期操作)已经回滚,但任何后续操作(仍在 TransactionScope
内)都可以在 nul-transaction 中执行, 即自动提交.
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 错误?更多信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:.NET 中的 TransactionScope 错误?更多信息?


基础教程推荐
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01