【问题标题】:Lightswitch Application fails to find 'Oracle.ManagedDataAccessDTC' when deployed on IISLightswitch 应用程序在 IIS 上部署时无法找到“Oracle.ManagedDataAccessDTC”
【发布时间】:2016-08-16 20:43:08
【问题描述】:

我在 Visual Studio 2013 中创建了一个没有自定义代码的基本 HTML Lightswitch 应用程序。它连接到 Oracle 数据库并在本地运行良好。

我将应用程序部署到带有 IIS 的服务器,当我导航创建的 url 时应用程序会加载,但在应用程序通常会显示 Oracle 数据库中的值列表之前出现“EnlistTransaction 上的基础提供程序失败”错误.

我运行了一个堆栈跟踪来发现以下错误。该应用似乎没有找到 Oracle 数据访问客户端 (Oracle.ManagedDataAccessDTC):

[Microsoft.LightSwitch.DataService][Application:Error]
[LightSwitchServiceApplication.P167:CON_APP_TAXes] An exception has occurred:  
Microsoft.LightSwitch.DataServiceOperationException: The underlying provider 
failed on EnlistTransaction. ---> System.Data.EntityException: The underlying 
provider failed on EnlistTransaction. ---> 
System.TypeInitializationException: The type initializer for 
'OracleInternal.MTS.DTCPSPEManager' threw an exception. ---> 
System.IO.FileNotFoundException: Could not load file or assembly 
'Oracle.ManagedDataAccessDTC, Version=4.121.2.0, Culture=neutral, 
PublicKeyToken=89b483f429c47342' or one of its dependencies. The system 
cannot find the file specified.

我使用 ODAC 12c Release 4(12.1.0.2) 安装程序在我的机器上本地安装了 Oracle 数据访问客户端,其中包括 Oracle.ManagedDataAccessDTC。

我确认我的机器和服务器安装了相同版本的 Oracle.ManagedDataAccessDTC。

【问题讨论】:

    标签: .net oracle dll odac oracle-manageddataaccess


    【解决方案1】:

    通过将我的数据源驱动程序类型从 Oracle 数据库(ODP.NET,托管驱动程序)切换到 Oracle 数据库(ODP.NET,非托管驱动程序)解决了这个问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-06-24
      • 1970-01-01
      • 2019-01-17
      • 1970-01-01
      • 2022-01-07
      • 2015-12-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多