如何在仅具有Oracle 12c的计算机上托管使用Oracle 11g的ASP.NET
我的ASP.NET应用程序在
Windows Server 2008 R2服务器上运行.已安装Oracle 11g.
我将此应用程序部署到Windows Server 2016服务器. Oracle 12c安装在此服务器中(不支持11g). 当我运行该应用程序时,我收到此错误:
如果我将Oracle 11g dll(Oracle.DataAccess.dll)复制到应用程序的bin文件夹,我会看到以下消息:
有没有办法在不安装Oracle 11g或更改应用程序代码的情况下运行此应用程序? 解决方法如果我理解你的应用程序链接到Oracle.DataAccess.dll的11gR2 DLL.你能检查路径中的dll版本(可能在GAC中,但并非总是如此)? 您在Web.config的这一部分中有什么(从我的网站上取样)?这与您路径中的dll匹配吗? : <runtime> <!-- This prevents the Windows Event Log from frequently logging that HMAC1 is being used (when the other party needs it). --> <legacyHMACWarning enabled="0" /> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <!-- Oracle --> <dependentAssembly> <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89B483F429C47342" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-4.65535.65535.65535" newVersion="4.122.1.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" /> <bindingRedirect oldVersion="4.0.0.0 - 4.65535.65535.65535" newVersion="4.122.1.0" /> </dependentAssembly> 上面我将驱动程序的所有版本重新映射到我服务器上安装的驱动程序.它通常可以正常工作,除非你主动使用只存在于“up”版本中的东西. 请务必检查您的DLL的版本(上面的版本是12.2驱动程序). (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |