TransactionOptions options = new TransactionOptions();
options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
options.Timeout = new TimeSpan(0, 5, 0);
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options))
{
try
{
Update to Database One;
Update to Database Two;
scope.Complete();
}
catch (Exception ex)
{
scope.Dispose();
throw;
}
}
I have two SQL updates that I need to do in .NET transaction. The above code is giving me the error:
"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."
DTC is enabled on both the servers where the databases are installed. Please guide me in the right direction.