TransactionScope Prematurely Completed

前端 未结 7 876
[愿得一人]
[愿得一人] 2020-12-13 02:01

I have a block of code that runs within a TransactionScope and within this block of code I make several calls to the DB. Selects, Updates, Creates, and Deletes, the whole ga

7条回答
  •  青春惊慌失措
    2020-12-13 02:52

    Confirmed this error can also be caused by a transaction timeout. Just to add to what Marcus + Rolf have stated, if you haven't explicitly set a timeout on the TransactionScope, the timeout TimeSpan will assume a default value. This default value is the smaller of:

    1. If you've overridden the local app.config / web.config setting, e.g.

      
      
      
      
    2. But this is then 'capped' at the machine.config setting

提交回复
热议问题