Hope this helps someone someday:
If you have a TransactionScope with multiple SQL operations inside, DTC will not be enabled provided
- you use the same connection string for each connection.
- connections are not nested.
those. open, do something, close. open, do something, close.
Now for getting: if you ever do this in your process (in another thread)
SqlConnection.ClearAllPools()
and this happens between your two operations - DTC will be activated immediately. If you do not have a DTC, it will throw an exception.
Dodgyrabbit
source share