Tech Off Post

Single Post Permalink

View Thread: Transaction Management between layers
  • User profile image

    So upon further investigation and in depth research on this I have realized that there is no way i am going to be able to use TransactionScope.  TransactionScope is causing my transactions to be promoted to MSDTC just because I am opening 2 connections to the same database...and not even at the same time...just one after the other and the first one is always closed before the second is open.

    When MSDTC is utilized, MSDTC is turned off by default on XP home and Pro. (At least it appears to be on my development box - xp pro). 

    So on my first transaction my application errors out until MSDTC is requested 1 time. After the first request MSDTC starts or "spins up" in COM+  and all subsequent calls work.  If I reboot the system MSDTC will stop and the first call to MSDTC errors out again for me.

    If my users have to connect to another computer on a small LAN they have to enable MSDTC remote and incoming connections and even when I do that I can't seem to get remote MSDTC connections to work.  You have to ensure firewalls are disabled and that MSDTC can pass through firewalls if they are still enabled etc. etc. it is a huge nightmare.

    My users are mechanics, book keepers and small business owners. They download our software from our website to try it out.

    I am not going to take support call after support call trying to help non technical users configure MSDTC so that they can savea  customer record. 

    Microsoft doesn't appear to have any way to programmatically configure MSDTC (maybe I am missing some .net assembly to do this somewhere)

    It  just seems like such a huge hassle to try to deploy your application today as a Microsoft ISV.  I can't imagine making my users go through all this configuration just to network 2 computers together.

    So thats my 2 cents on the new TransactionScope, Distributed Transactions and MSDTC anyway. I am going back to passing SQlTransaction objects around so my users don't have to deal with this administration nightmare of MSDTC configuration.

    Can you imagine making mechanics, book keepers and other non technical users  have to configure MSDTC everytime they want to hook up a second computer? I just can't see it.