TransactionScope with BO?

TransactionScope with BO?

Old forum URL: forums.lhotka.net/forums/t/3958.aspx


Samnang Chhun posted on Wednesday, November 28, 2007

I try to use TransactionScope class to make Distributed Transactions in simple like code below:

TransactionOptions options = new TransactionOptions();
options.IsolationLevel = IsolationLevel.ReadCommitted;
options.Timeout = new TimeSpan(0, 2, 0);

using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options))
{
    //Save the data
    listingGeneral.Save();
    //Save the audit transaction
    auditTransaction.Save();

    scope.Complete();
}

I get an error message : "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.", but I have started Distributed Transaction Coordinator service in Services.msc already.

Cheers,
Samnang

RockfordLhotka replied on Thursday, November 29, 2007

I'm guessing you are running Windows XP SP2? There's a whole Microsoft knowledge base article on how to get DTC reenabled in that environment. You have to start the service, but you also need to open a port in the firewall and I think there's another step beyond that.

Samnang Chhun replied on Thursday, November 29, 2007

Sure, my development pc is running Windows XP SP2 and database server is running Windows Server 2003, but I've disabled firewall already. I still get an error, how can I do?

Cheers,
Samnang

RockfordLhotka replied on Thursday, November 29, 2007

Read the KB article. As I say, I think there’s one other step you need to do, but I don’t recall what it is…

 

Rocky

 

 

From: Samnang Chhun [mailto:cslanet@lhotka.net]
Sent: Thursday, November 29, 2007 1:18 AM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] TransactionScope with BO?

 

Sure, my development pc is running Windows XP SP2 and database server is running Windows Server 2003, but I've disabled firewall already. I still get an error, how can I do?

Cheers,
Samnang


Copyright (c) Marimer LLC