c# TransactionScope time out -


in c code im using transaction scope.

but gives timeout exception after 10mins below;

system.transactions.transactionabortedexception: transaction has aborted. ---> system.timeoutexception: transaction timeout    --- end of inner exception stack trace ---    @ system.transactions.transactionstateaborted.begincommit(internaltransaction tx, boolean asynccommit, asynccallback asynccallback, object asyncstate)    @ system.transactions.committabletransaction.commit()    @ system.transactions.transactionscope.internaldispose()    @ system.transactions.transactionscope.dispose() 

i have following configuration in web.config file;

  <system.transactions>     <defaultsettings timeout="22:00:00" />   </system.transactions> 

why im still getting timeout? how fix issue? please advice me.

check machinesettings/maxtimeout value in %windir%\microsoft.net\framework64\v4.0.30319\config\machine.config file (you may need alter path if you're using 32bit clr or different version).

this value limits effective timeout, every timeout set (either via defaultsettings or in code via transactionscopeoptions) capped value. "default" 10 minutes.

you can search web "machinesettings maxtimeout" couple of related blog entries.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -