.net - Random MSDTC exception with WCF over MSMQ -


we have service performing wcf calls on msmq using netmsmqbinding. unfortunately we're seeing random (every few days after thousands of calls) accessviolationexception coming out of msdtc service. error happening on physically-older xp production systems , can't re-create in dev. i've resorted imaging , running actual production instances in vms runs solid days. i've compared version numbers of every msmq , msdtc-related dlls can find , match. windows updates have been applied recently. wcf endpoints running single instancecontextmode , concurrencymode set single well.

short of resolving issue, there anyway can catch/recover following error?

is there way keep netmsmqbinding promoting transaction? we're not using other resources queues themselves.

the process terminated due unhandled exception. exception info: system.accessviolationexception stack:    @ system.transactions.oletx.idtcproxyshimfactory.begintransaction(uint32, system.transactions.oletx.oletxtransactionisolationlevel, intptr, system.guid byref, system.transactions.oletx.itransactionshim byref)    @ system.transactions.oletx.oletxtransactionmanager.createtransaction(system.transactions.transactionoptions)    @ system.transactions.transactionstatepromoted.enterstate(system.transactions.internaltransaction)    @ system.transactions.enlistablestates.promote(system.transactions.internaltransaction)    @ system.transactions.transaction.promote()    @ system.transactions.transactioninterop.converttooletxtransaction(system.transactions.transaction)    @ system.transactions.transactioninterop.getdtctransaction(system.transactions.transaction)    @ system.servicemodel.channels.msmqqueue.getnativetransaction(system.servicemodel.channels.msmqtransactionmode)    @ system.servicemodel.channels.msmqqueue.receivecoredtctransacted(system.servicemodel.channels.msmqqueuehandle, system.servicemodel.channels.nativemsmqmessage, system.timespan, system.servicemodel.channels.msmqtransactionmode, int32)    @ system.servicemodel.channels.msmqqueue.receivecore(system.servicemodel.channels.msmqqueuehandle, system.servicemodel.channels.nativemsmqmessage, system.timespan, system.servicemodel.channels.msmqtransactionmode, int32)    @ system.servicemodel.channels.msmqqueue.tryreceiveinternal(system.servicemodel.channels.nativemsmqmessage, system.timespan, system.servicemodel.channels.msmqtransactionmode, int32)    @ system.servicemodel.channels.msmqqueue.tryreceive(system.servicemodel.channels.nativemsmqmessage, system.timespan, system.servicemodel.channels.msmqtransactionmode)    @ system.servicemodel.channels.msmqreceivehelper.tryreceive(system.servicemodel.channels.msmqinputmessage, system.timespan, system.servicemodel.channels.msmqtransactionmode, system.servicemodel.channels.msmqmessageproperty byref)    @ system.servicemodel.channels.msmqinputchannelbase.tryreceive(system.timespan, system.servicemodel.channels.message byref)    @ system.servicemodel.channels.securitychannellistener`1+securityinputchannel[[system.__canon, mscorlib, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089]].tryreceive(system.timespan, system.servicemodel.channels.message byref)    @ system.servicemodel.dispatcher.inputchannelbinder.tryreceive(system.timespan, system.servicemodel.channels.requestcontext byref)    @ system.servicemodel.dispatcher.errorhandlingreceiver.tryreceive(system.timespan, system.servicemodel.channels.requestcontext byref)    @ system.servicemodel.dispatcher.channelhandler.trytransactionalreceive(system.transactions.transaction, system.servicemodel.channels.requestcontext byref)    @ system.servicemodel.dispatcher.channelhandler.transactedloop()    @ system.servicemodel.dispatcher.channelhandler.synctransactionalmessagepump()    @ system.servicemodel.dispatcher.channelhandler.onstartsyncmessagepump(system.object)    @ system.runtime.iothreadscheduler+scheduledoverlapped.iocallback(uint32, uint32, system.threading.nativeoverlapped*)    @ system.runtime.fx+iocompletionthunk.unhandledexceptionframe(uint32, uint32, system.threading.nativeoverlapped*)    @ system.threading._iocompletioncallback.performiocompletioncallback(uint32, uint32, system.threading.nativeoverlapped*) 

your service configured run singleton instance. may having threading issues dtc when service called under load multiple clients. unless you're absolutely need run service singleton , service code thread safe, should use instancecontextmode of per call or per session (depending on security config).

you try mark service operation method implementation with:

[operationbehavior(transactionscoperequired = false)] 

and prevent code inside method enlisting in ambient transaction msmq creates process message.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -