COMException is Raised

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi,
I have created a collection of serviced components that performs money transaction between 5 schools. I have marked all the components with Transaction(TransactionOption.Required) attribute. All the methods in the components are marked with the AutoComplete() attribute.

But when I run the application, it is showing incorrect balance amount are being transferred. When I debug, I am getting this exception:

System. Runtime.InteropServices.COMException
The HRESULT for the exception is 0x8004E002.
"The root transaction wanted to commit, but transaction aborted."

This exception occurs only during the debugging session, and not when the components run outside of the debugger. Please give your suggestions to reolve this problem.
 
Hi,
Remove the AutoComplete attribute from all the methods and add calls to the ContextUtil.SetComplete() and ContextUtil.SetAbort().
Just make a try and get back to me with more detailed error report.
 
Dear John,
I have removed and placed the ContextUtil, but I am getting the same error report and it is taking more time to do this transaction.
 
Back
Top