开发者

SqlConnection and TransactionScope Timeout

开发者 https://www.devze.com 2023-01-17 01:11 出处:网络
I have a TransactionScope (over DTC,开发者_JAVA百科 read committed) with a timeout of 60 minutes.

I have a TransactionScope (over DTC,开发者_JAVA百科 read committed) with a timeout of 60 minutes. In the TransactionScope I have opened the connection (I hope to enlist in the transaction) but after 30 seconds I get a timeout.

In the machine.config I changed the system.transaction maxTimeout to 60 minutes.

Why does the timeout occur after 30 seconds?


A SqlCommand already has a CommandTimeout property that defaults to 30 seconds. May be you are using it within your transaction.

0

精彩评论

暂无评论...
验证码 换一张
取 消