'TransactionScope' is not defined

Discussion in 'Site Programming, Development and Design' started by Jane Liu, Jul 8, 2013.

  1. We develop web app using visual studio, the code as following:

    using System.Transactions;

    using (TransactionScope trans = new TransactionScope())
    {

    Response.Write("test transaction");

    trans.Complete();
    }

    It's run in my local host, but got the error "'TransactionScope' is not defined." in Winhost. Some one can help me?
     
    Last edited by a moderator: Oct 14, 2015
  2. The code works ok now.

    By the way, if the database and web app are not in the same host, does the transaction works fine?
    We want to buy another host in Winhost, but must use distributed transaction.
     
    Last edited by a moderator: Oct 14, 2015

Share This Page