I have a WCF service consumed by a Windows Workflow via a transaction. I have a method that calls a stored procedure using EF.
The stored procedure takes a long time to return a result, I get the following exception:
The transaction under which this method call was executing was asynchronously aborted.
When I set the TransactionTimeout
via ServiceBehaviour
attribute, everything works fine:
[ServiceBehavior(TransactionTimeOut="00:02:00")]
But when the TransactionTimeOut
was set via app.config
, it's not working and I get the above exception.
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceTimeouts transactionTimeout="00:02:00"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
I have also tried <System.transaction>
but I'm still getting the error.
Thanks in advance for your help.