2012-10-31 49 views
2

我有一個使用Com +將.xml數據導入到數據庫的.net 2.0窗口服務,並且大多數時候它工作得很好。.Net Com + TransactionProxyException的原因以及如何解決它?

但是,有時(很少)我得到一個事務代理異常拋出。 (過去兩個月發生了一次,在此期間25萬處決是正確的)。

最糟糕的部分是,數據正確地導入到數據庫,但拋出異常並且事務未被回滾。我試圖手動創建異常並驗證事務處理是否正確。

你以前見過這個嗎?關於在線錯誤的信息並不多。該服務在帶有SP2的Server 2003上運行。

引發的異常是:

System.EnterpriseServices.TransactionProxyException

System.EnterpriseServices.TransactionProxyException 而堆棧跟蹤:

System.EnterpriseServices.TransactionProxy.MapTxExceptionToHR(TransactionExceptiontxException, Boolean isInCommit)
at System.EnterpriseServices.TransactionProxy.Commit(Guid guid)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.EnterpriseServices.Thunk.Callback.DoCallback(Object otp, IMessage msg, IntPtr ctx, Boolean fIsAutoDone, MemberInfo mb, Boolean bHasGit) at System.EnterpriseServices.ServicedComponentProxy.CrossCtxInvoke(IMessage reqMsg) at System.EnterpriseServices.ServicedComponentProxy.Invoke(IMessage request)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at MyService

回答

0

也許嘗試更改這些DTC設置?

http://support.microsoft.com/kb/2556390

+0

數據庫與服務在同一臺服務器上,所以我不認爲它是必需的。如果Com +設置不正確,那麼該服務不應該一直失敗嗎? (但我會改變設置,只是爲了排除它) – dhanjel

相關問題