Understanding MSDTC in Windows
c#, msdtc, subsonic, transactions
Solution
MSDTC should come installed with windows. If it's not it can be installed with the following command:
msdtc -install
You can configure the MSDTC service using sc.exe. Set the service to start automatically and start the service:
sc config msdtc start= auto
sc start msdtc
Note you will need administrator privilege to perform the above.
Problem
To use transaction construct(as follows) in Subsonic, MSDTC needs to be running on Windows machine. Right? ``` using (TransactionScope ts = new TransactionScope()) { using (SharedDbConnectionScope sharedConnectionScope = new SharedDbConnectionScope()) { // update table 1 // update table 2 // ts.commit here } } ``` - Is MS-DTC a default service on Windows systems(XP, Vista, Windows 7, Servers etc)? - If it is not enabled, how can I make sure it gets enabled during the installation process of my application?