[英]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)
Now it doesn't look in the GAC anymore.现在它不再出现在 GAC 中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.