Tech Off Thread

2 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

TransactionScrope and MSDTC

Back to Forum: Tech Off
  • User profile image
    ferguslogic

    Hi everyone,


    I have a C# 2.0 /Sql Express 05 winforms application that gets deployed to about 200 businesses across the U.S.

    In the C# applicaiton I have started to use transactionScope like so

    using (TransactionScope ts = new TransactionScope())

    {

    aEntity.save();  //opens connection to database A
    bEntity.save();  //also opens connection to database A

    ts.Complete();

    }

    Even though 2 connections with the same connection string are being opened to the same database Microsoft is still promoting this transaction to a distributed transaction and it is being handled by MSDTC. How do I know? I shut the MSDTC service off and this fails with a message that says "MSDTC is not turned on".

    Its a small pain and some overhead but overall I am fine with this promotion and I have one question that I need answered.

    Does MSDTC run automatically on windows 2000, XP home, XP Pro and Vista because these are the platforms I need to support.

    Users download this application via the web and I need to know whether I am going to have to configure MSDTC or not for them.

    thanks for the MSDTC help.

  • User profile image
    ferguslogic

    From what I have read MSDTC is on all Microsoft platforms.

    So I am anticpating this to be true and I am using a .net service controller to check if MSDTC is running. If it not running I start it myself.

    If anyone knows differently please let me know.

    thanks a lot

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.