【问题标题】:MSDTC ERROR After separating application and database to different serversMSDTC ERROR 将应用程序和数据库分离到不同的服务器后
【发布时间】:2016-11-01 07:57:38
【问题描述】:

我有一个 dot net 应用程序,它最初与它的数据库托管在同一个盒子中,在将两者分开到不同的盒子后,我不断收到 MSDTC 错误

这是错误日志

与底层事务管理器的通信失败。在 System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[]propagationToken) 在 System.Transactions.TransactionStatePSPEOperation.PSPEPromote(InternalTransaction tx) 在 System.Transactions.TransactionStateDelegatedBase.EnterState(InternalTransaction tx) 在 System.Transactions.EnlistableStates.Promote(InternalTransaction tx)在 System.Transactions.Transaction.Promote() 在 System.Transactions.TransactionInterop.ConvertToOletxTransaction(Transaction transaction) 在 System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] 行踪) 在 System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(事务 tx) 在 System.Data.SqlClient.SqlInternalConnection.EnlistTransaction(事务事务) 在 System.Data.SqlClient.SqlConnection.EnlistTransaction(事务事务) 在 System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser 用户) 在系统。 Data.Linq.SqlClient.SqlProvider.get_IsSqlCe()在 System.Data.Linq.SqlClient.SqlProvider.InitializeProviderMode() 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(表达式查询) 在 System.Data.Linq.DataQuery@987654323 @1 来源)

两台机器上的 MSDTC 设置

我还在两个防火墙中打开了端口 135 和端口 5000 到 50020。

请帮助我的可能是什么问题。

【问题讨论】:

  • 您是否尝试过退后一步,即您的应用程序是否仍然可以执行与数据库的基本连接并执行简单的读取以返回一些记录?

标签: c# sql rpc msdtc


【解决方案1】:
    This solved my issue 

我在两个服务器中编辑了下面的文件,将它们的 IPS 和分配名称添加到机器我能够使用分配的名称相互 ping 两台机器,然后将配置文件数据源更改为名称而不是使用 ips

这是我编辑的确切行 xxx.16.100.1 JpAppServer # x 客户端主机

    C:\Windows\System32\Drivers\etc

    # Copyright (c) 1993-2009 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
           xxx.16.100.1     JpAppServer              # x client host

    # localhost name resolution is handled within DNS itself.
    #   127.0.0.1       localhost
    #   ::1             localhost

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多