The code shown here worked fine without any error on quality site, but the same code is causing an error
The Transaction has aborted
on the production site.
The error occurs on dispose of the scope. Please help me resolve this issue.
I did check:
- Network DTC Setting on server and database server
- Both sites (Quality and Production) are on same Server (Server A) and database also on same server (Server B)
Code:
option.IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted;
option.Timeout = TimeSpan.FromMinutes(5);
using (_objTransactionScope = new TransactionScope(TransactionScopeOption.Required, option))
{
//..Open Connection
//..Process the Document
//..Update Additional information in Table2 about document(Delete/Insert)
//..Update Location Information in Table3 about document(Delete/Insert)
//..Delete the Document in Table4 in Differant Database on Differant Server(WCF Service)
//..Update the Checksum of the Document and Metadata in Table1
//..Delete Lock Entry From Table5
//..Close Connection
//..Commit Transaction Scope
}
//..Close Connection //..Commit Transaction Scopebe other way around?