.Net Com + TransactionProxyException的原因以及如何解决?

时间:2012-10-31 06:51:43

标签: .net transactions com+

我有一个使用Com +的.Net 2.0 Windows服务,它将xml数据导入到数据库中,并且大多数情况下它完全正常。

但是,有时(很少)我会抛出一个事务代理异常。 (过去两个月发生了一次,在此期间有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

1 个答案:

答案 0 :(得分:0)

也许尝试更改这些DTC设置?

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