首页 > 解决方案 > Econnect 警告:使用了分布式事务

问题描述

我们刚刚将我们的一个应用程序(即 .net windows 服务)移至与 Microsoft GP 数据库服务器所在域不同的新 2016 服务器。

我们正在使用 EConnect 14 (GP 2015)。

我们在应用程序事件日志中收到了 1000 条这样的警告,这会导致问题,因为我们使用 System Center,当它看到所有这些警告时,它会加速 CPU 来处理它们。在我们重新启动 Windows 服务之前,它们不会停止。

这是警告。

Distributed Transaction was used
This could be caused by new connection strings used within each xml document, but reusing the base transaction scope. 
Configuration Setting 'ReuseBaseTransaction' is by default FALSE. Remove this configuration setting, or set it to FALSE if this was not the expected behavior.

我已经尝试将其添加到 econnect 服务配置和我的应用程序配置中,尝试将其设置为 false,也尝试将其设置为 true,并且警告仍然存在。

   <appSettings>
         <add key="ReuseBaseTransaction" value="false"/>
  </appSettings>

我们正在使用 econnect windows 服务,我们没有绕过代理并直接进入存储的过程。

你知道如何防止这个警告。我真的不在乎事务是否已分发。我找到了这篇相关文章,但它没有提供解决方案。

https://dynamicsgpland.blogspot.com/2010/09/econnect-2010-fills-event-log-with.html

以及这个。
https://community.dynamics.com/gp/b/gpdynland/archive/2010/09/23/econnect-2010-fills-event-log-with-warning-34-distributed-transaction-was-used-34

-兰迪

标签: microsoft-dynamicseconnect

解决方案


您可以在 app.config 中配置 eConnect API 中的一个标志,以禁用记录这些促销活动。

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
 <appSettings>
  <add key="LogDtcPromotions" value="false"/>
 </appSettings> 
    <startup> 
        <supportedRuntime version="v4.0"  sku=".NETFramework,Version=v4.6.1" />
    </startup>
</configuration>

推荐阅读