TransactionScope with multiple connections but no MSDTC. #2913
-
Hello everyone, I have a Network access for Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for network access in the security configuration for MSDTC using the Component Services Administrative tool.' The thing is that I am not interested on using MSDTC when I open my second connection, all the second connection does is read some data from a different database so I prefer not to recruit the second connection into the transaction scope. To get around the error, I ended up wrapping the second connection call inside a new transaction scope as follows:
This appears to work fine, but I was wondering if this is asking for trouble and will end up causing issues because of the way the CSLA framework may be handling thigs. Is this a good workaround? Or are the better approaches to this without complicating things to much. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
When you do not want connections to share a TransactionScope, what you have done is a good solution. An alternate technique is to not use TransactionScope at all and manage transactions via SqlTransaction. |
Beta Was this translation helpful? Give feedback.
When you do not want connections to share a TransactionScope, what you have done is a good solution. An alternate technique is to not use TransactionScope at all and manage transactions via SqlTransaction.