TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
senthil kumar
NA
1
0
.Net Transaction Scope Error -The MSDTC transaction manager
Jun 5 2013 7:23 AM
The below error is throwing while running multiple transaction in single transaction scope
Error - "The MSDTC transaction manager was unable to pull the transaction from the source transaction manager due to communication problems. Possible causes are: a firewall is present and it doesn't have an exception for the MSDTC process, the two machines cannot find each other by their NetBIOS names, or the support for network transactions is not enabled for one of the two transaction managers. (Exception from HRESULT: 0x8004D02B)"
I am using the below sample code to Save the Card details,
public Int64 SaveDetails(CardDO _Card)
{
try
{
Int64 PayerId = 0;
// Begin the transcation and call the add method
var transactionScopeOptions = new TransactionOptions();
transactionScopeOptions.IsolationLevel = System.Transactions.IsolationLevel.Serializable;
transactionScopeOptions.Timeout = TimeSpan.MaxValue;
using (TransactionScope OuterScope = new TransactionScope(TransactionScopeOption.Required, transactionScopeOptions))
{
using (TransactionScope InnerScope1 = new TransactionScope())
{
PayerId = SavePayer(_Card.PayerDetails, _Card.ROW_STATE);
InnerScope1.Complete();
}
_Card.PAYER_ID = PayerId;
using (TransactionScope InnerScope2 = new TransactionScope())
{
_Card.PAYER_ID = PayerId;
if (_Card.ROW_STATE == RowState.Created)
{
_Card._CARD_ID = SaveCardDetails(_Card);
}
else if (_Card.ROW_STATE == RowState.Modified)
{
int result = UpdateCardDetails(_Card);
if (result <= 0)
{
throw new Exception("Error : card updation failed.");
}
}
InnerScope2.Complete();
}
using (TransactionScope InnerScope3 = new TransactionScope())
{
SaveCardLabour(_Card.CardLabourList, _Card.ROW_STATE, _Card._CARD_ID);
InnerScope3.Complete();
}
OuterScope.Complete();
}
// DALHelper.Instance.Commit(); // Commit the Transcation
return _Card._CARD_ID;
}
catch (TransactionAbortedException ex)
{
throw new Exception(" Card Save Aborted: " + ex.Message);
}
catch (Exception ex)
{
throw ex;
}
}
The first DB call "SavePayer()" is working perfect; when it enter the Second DB call "SaveCardDetails", transcation getting failed and am getting the below error,
The MSDTC transaction manager was unable to pull the transaction from the source transaction manager due to communication problems. Possible causes are: a firewall is present and it doesn't have an exception for the MSDTC process, the two machines cannot find each other by their NetBIOS names, or the support for network transactions is not enabled for one of the two transaction managers. (Exception from HRESULT: 0x8004D02B)
If you have any idea on this issue, help me out..
Reply
Answers (
0
)
jQuery Table in ASP.NET
code to create function in class file disable multiple panel