简体   繁体   English

如何强制 ASP.NET Web 应用程序使用 BIN 文件夹中的 Oracle DLL?

[英]How to force an ASP.NET Web app to use Oracle DLLs in the BIN folder?

So I have an web app that need the Oracle 19c client (4.122.19.1) due to certain syntax changes, while our Dev IIS server has an older 4.121.2.0 client.因此,由于某些语法更改,我有一个需要 Oracle 19c 客户端 (4.122.19.1) 的 Web 应用程序,而我们的 Dev IIS 服务器有一个较旧的 4.121.2.0 客户端。

Anyway, I put all of what I've heard to be the proper support dlls in the Bin directory of the app, which from all my research are these: oci.dll ociw32.dll Oracle.ManagedDataAccess.dll Oracle.Web.dll orannzsbb19.dll oraocci19.dll oraocci19d.dll oraociei19.dll oraons.dll OraOps19.dll无论如何,我将所有我听说过的正确支持 dll 放在应用程序的 Bin 目录中,从我所有的研究来看,这些是:oci.dll ociw32.dll Oracle.ManagedDataAccess.dll Oracle.Web.dll orannzsbb19 .dll oraocci19.dll oraocci19d.dll oraociei19.dll oraons.dll OraOps19.dll

This runs perfectly from my PC in Visual Studio.这在我的 PC 上在 Visual Studio 中完美运行。 When I deploy to a Dev IIS server (with app-pool running in Enable 32-bit because my PC runs IISExpress in 32-bit) There are various Oracle connection errors.当我部署到 Dev IIS 服务器时(应用程序池在启用 32 位中运行,因为我的 PC 以 32 位运行 IISExpress)有各种 Oracle 连接错误。

Now, in Process Explorer, on my PC, I look at the IISExpress and I can see it's loaded all of the above dlls, though from the GAC because I have this client installed locally.现在,在进程资源管理器中,在我的 PC 上,我查看了 IISExpress,我可以看到它加载了上述所有 dll,尽管是从 GAC 加载的,因为我在本地安装了这个客户端。 Yet on the Dev server, Process Explorer, under my W3WP.exe process, I see only the Oracle.ManagedDataAccess.dll and Oracle.Web.dll, but none of the support DLLS.然而,在开发服务器 Process Explorer 上,在我的 W3WP.exe 进程下,我只看到 Oracle.ManagedDataAccess.dll 和 Oracle.Web.dll,但没有一个支持 DLLS。 I'm fairly certain the fact that these are missing, especially OraOps19.dll, is the issue.我相当确定缺少这些的事实,尤其是 OraOps19.dll,是问题所在。

I've used the "DLLPath" thing in the web.config, it makes no difference.我在 web.config 中使用了“DLLPath”,这没什么区别。 I was always told that Asp.Net always trys to load from the BIN first.我总是被告知 Asp.Net总是首先尝试从 BIN 加载。 Yet here I believe it is at least partially ignoring it--both in my PC, which is going straight to the GAC, and from the Dev IIS server, which does get the proper .Web and .ManagedDataAccess from Bin, but nothing else.然而,在这里我相信它至少部分地忽略了它——无论是在我的 PC 中,它直接进入 GAC,还是来自 Dev IIS 服务器,它确实从 Bin 获得了正确的 .Web 和 .ManagedDataAccess,但没有别的。

How can I make this forget the Gac and force it to find anything it needs Oracle-wise in the Bin?我怎样才能让它忘记 Gac 并强制它在 Bin 中找到它需要的任何 Oracle 明智的东西? Thanks谢谢

The dlls are bugged; dll 被窃听; it's not allowed to release breaking changes to signed dlls like that.不允许像这样发布对已签名 dll 的重大更改。 Workaround:解决方法:

Assuming these are 100% il code (no C++/clr involved)假设这些是 100% il 代码(不涉及 C++/clr)

  1. ildasm the oracle dlls to .il and .res files ildasm oracle dll 到 .il 和 .res 文件
  2. Remove all references to the public key删除对公钥的所有引用
  3. ilasm the .il and .res files back to dlls ilasm .il 和 .res 文件回到 dll
  4. link your application against those dlls将您的应用程序与这些 dll 链接

Now it doesn't look in the GAC anymore.现在它不再出现在 GAC 中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将第三方dll从bin文件夹移动到ASP.NET Web Forms项目中的另一个文件夹? - How to move third party dlls from bin folder to another folder in ASP.NET Web Forms project? asp.net将第3方dll部署到bin文件夹 - asp.net deploy 3rd party dlls to bin folder asp.net:在asp.net MVC中将dll放入Bin文件夹中是否可以工作? - asp.net: Should dropping dlls into the Bin folder work in asp.net MVC? 如何访问ASP.NET MVC项目的bin文件夹中的DLL? - How to access DLL in bin folder of ASP.NET MVC project? 我可以使用反射来查找ASP.NET中的bin / [Configuration]文件夹而不是asp临时文件夹 - Can I use reflection to find the bin/[Configuration] folder in ASP.NET instead of the asp temporary folder ASP.NET web 应用强制 iframe 重新加载 - ASP.NET web app force an iframe to reload 将演示文稿dll添加到asp.net(使用Telerik控件)Web应用程序会导致问题 - Adding Presentation dlls to asp.net (with telerik controls) web app causes problems 从外部文件夹加载asp.net dll - Load asp.net dlls from external folder app_code文件夹中的asp.net使用类 - asp.net use class in app_code folder 如何在不停止应用程序的情况下发布asp.net core app Dlls - How to publish asp.net core app Dlls without having to stop the application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM