We have a service that is performing WCF calls over MSMQ using the NetMsmqBinding. Unfortunately we're seeing a random (every few days after thousands of calls) AccessViolationException coming out of the MSDTC service. This error is only happening on physically-older XP production systems and I can't re-create it in dev. I've even resorted to imaging and running actual production instances in VMs but everything runs solid for days. I've compared version numbers of every MSMQ and MSDTC-related dlls I can find and they all match. Windows Updates have been applied recently. The WCF endpoints are running with an single InstanceContextMode and the ConcurrencyMode is set to single as well.
Short of actually resolving the issue, is there anyway I can catch/recover from the following error?
Is there a way to keep the NetMsmqBinding from promoting the transaction? We're not using any other resources than the queues themselves.
The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
at System.Transactions.Oletx.IDtcProxyShimFactory.BeginTransaction(UInt32, System.Transactions.Oletx.OletxTransactionIsolationLevel, IntPtr, System.Guid ByRef, System.Transactions.Oletx.ITransactionShim ByRef)
at System.Transactions.Oletx.OletxTransactionManager.CreateTransaction(System.Transactions.TransactionOptions)
at System.Transactions.TransactionStatePromoted.EnterState(System.Transactions.InternalTransaction)
at System.Transactions.EnlistableStates.Promote(System.Transactions.InternalTransaction)
at System.Transactions.Transaction.Promote()
at System.Transactions.TransactionInterop.ConvertToOletxTransaction(System.Transactions.Transaction)
at System.Transactions.TransactionInterop.GetDtcTransaction(System.Transactions.Transaction)
at System.ServiceModel.Channels.MsmqQueue.GetNativeTransaction(System.ServiceModel.Channels.MsmqTransactionMode)
at System.ServiceModel.Channels.MsmqQueue.ReceiveCoreDtcTransacted(System.ServiceModel.Channels.MsmqQueueHandle, System.ServiceModel.Channels.NativeMsmqMessage, System.TimeSpan, System.ServiceModel.Channels.MsmqTransactionMode, Int32)
at System.ServiceModel.Channels.MsmqQueue.ReceiveCore(System.ServiceModel.Channels.MsmqQueueHandle, System.ServiceModel.Channels.NativeMsmqMessage, System.TimeSpan, System.ServiceModel.Channels.MsmqTransactionMode, Int32)
at System.ServiceModel.Channels.MsmqQueue.TryReceiveInternal(System.ServiceModel.Channels.NativeMsmqMessage, System.TimeSpan, System.ServiceModel.Channels.MsmqTransactionMode, Int32)
at System.ServiceModel.Channels.MsmqQueue.TryReceive(System.ServiceModel.Channels.NativeMsmqMessage, System.TimeSpan, System.ServiceModel.Channels.MsmqTransactionMode)
at System.ServiceModel.Channels.MsmqReceiveHelper.TryReceive(System.ServiceModel.Channels.MsmqInputMessage, System.TimeSpan, System.ServiceModel.Channels.MsmqTransactionMode, System.ServiceModel.Channels.MsmqMessageProperty ByRef)
at System.ServiceModel.Channels.MsmqInputChannelBase.TryReceive(System.TimeSpan, System.ServiceModel.Channels.Message ByRef)
at 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)
at System.ServiceModel.Dispatcher.InputChannelBinder.TryReceive(System.TimeSpan, System.ServiceModel.Channels.RequestContext ByRef)
at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.TryReceive(System.TimeSpan, System.ServiceModel.Channels.RequestContext ByRef)
at System.ServiceModel.Dispatcher.ChannelHandler.TryTransactionalReceive(System.Transactions.Transaction, System.ServiceModel.Channels.RequestContext ByRef)
at System.ServiceModel.Dispatcher.ChannelHandler.TransactedLoop()
at System.ServiceModel.Dispatcher.ChannelHandler.SyncTransactionalMessagePump()
at System.ServiceModel.Dispatcher.ChannelHandler.OnStartSyncMessagePump(System.Object)
at System.Runtime.IOThreadScheduler+ScheduledOverlapped.IOCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)
at System.Runtime.Fx+IOCompletionThunk.UnhandledExceptionFrame(UInt32, UInt32, System.Threading.NativeOverlapped*)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)