无法加载文件或程序集 'Oracle.Web,版本 = 2.112.1.0... 系统找不到指定的文件。(它已经加载到我的 GAC 中)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17194832/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Could not load file or assembly 'Oracle.Web, Version=2.112.1.0... The system cannot find the file specified. (It's already loaded in my GAC)
提问by Mike Marks
I'm trying to run my web app which references Oracle.Web, which is already loaded in my GAC:
我正在尝试运行引用 Oracle.Web 的 Web 应用程序,该应用程序已加载到我的 GAC 中:
When I run my web app, I get the error message:
当我运行我的网络应用程序时,我收到错误消息:
The Oracle.Web DLL is 32-bit.
Oracle.Web DLL 是 32 位的。
EDIT: Here's a printout of the assembly bind failure log for Oracle.Web. Basically, it fails to load from the GAC:
编辑:这是 Oracle.Web 的程序集绑定失败日志的打印输出。基本上,它无法从 GAC 加载:
* Assembly Binder Log Entry (6/19/2013 @ 10:20:49 AM) *
* 组装活页夹日志条目 (6/19/2013 @ 10:20:49 AM) *
The operation failed. Bind result: hr = 0x80070002. The system cannot find the file specified.
操作失败。绑定结果:hr = 0x80070002。该系统找不到指定的文件。
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll Running under executable c:\windows\system32\inetsrv\w3wp.exe
从以下位置加载的程序集管理器:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll 在可执行文件 c:\windows\system32\inetsrv\w3wp.exe 下运行
--- A detailed error log follows.
=== Pre-bind state information === LOG: User = IIS APPPOOL\DefaultAppPool LOG: DisplayName = Oracle.Web, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342 (Fully-specified) LOG: Appbase = file:///C:/blah/HR/ForHR/HRWS/ LOG: Initial PrivatePath = C:\blah\HR\ForHR\HRWS\bin LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\HRws\c1e0f910 LOG: Cache Base = C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\HRws\c1e0f910 LOG: AppName = 1f90b2c5 Calling assembly : (Unknown). === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\blah\HR\ForHR\HRWS\web.config LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config. LOG: Post-policy reference: Oracle.Web, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342 LOG: GAC Lookup was unsuccessful. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/HRws/c1e0f910/1f90b2c5/Oracle.Web.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/HRws/c1e0f910/1f90b2c5/Oracle.Web/Oracle.Web.DLL. LOG: Attempting download of new URL file:///C:/blah/HR/ForHR/HRWS/bin/Oracle.Web.DLL. LOG: Attempting download of new URL file:///C:/blah/HR/ForHR/HRWS/bin/Oracle.Web/Oracle.Web.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/HRws/c1e0f910/1f90b2c5/Oracle.Web.EXE. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/HRws/c1e0f910/1f90b2c5/Oracle.Web/Oracle.Web.EXE. LOG: Attempting download of new URL file:///C:/blah/HR/ForHR/HRWS/bin/Oracle.Web.EXE. LOG: Attempting download of new URL file:///C:/blah/HR/ForHR/HRWS/bin/Oracle.Web/Oracle.Web.EXE. LOG: All probing URLs attempted and failed.
--- 详细的错误日志如下。
=== 预绑定状态信息 === LOG: User = IIS APPPOOL\DefaultAppPool LOG: DisplayName = Oracle.Web, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342 (Fully-specified) LOG: Appbase = file :///C:/blah/HR/ForHR/HRWS/ 日志:初始 PrivatePath = C:\blah\HR\ForHR\HRWS\bin 日志:动态基础 = C:\Windows\Microsoft.NET\Framework64\v2。 0.50727\Temporary ASP.NET Files\HRws\c1e0f910 LOG: Cache Base = C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\HRws\c1e0f910 LOG: AppName = 1f90b2c )。=== LOG:此绑定在默认加载上下文中启动。日志:使用应用程序配置文件:C:\blah\HR\ForHR\HRWS\web.config 日志:使用主机配置文件:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config 日志:使用机器来自 C 的配置文件:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config。日志:政策后参考:Oracle.Web,版本=2.112.1.0,文化=中性,PublicKeyToken=89b483f429c47342 日志:GAC 查找失败。日志:正在尝试下载新的 URL 文件:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/HRws/c1e0f910/1f90b2c5/Oracle.Web.DLL。日志:正在尝试下载新的 URL 文件:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/HRws/c1e0f910/1f90b2c5/Oracle.Web/Oracle.Web.DLL。日志:正在尝试下载新的 URL 文件:///C:/blah/HR/ForHR/HRWS/bin/Oracle.Web.DLL。日志:正在尝试下载新的 URL 文件:///C:/blah/HR/ForHR/HRWS/bin/Oracle.Web/Oracle.Web.DLL。日志:正在尝试下载新的 URL 文件:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP。NET 文件/HRws/c1e0f910/1f90b2c5/Oracle.Web.EXE。日志:正在尝试下载新的 URL 文件:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/HRws/c1e0f910/1f90b2c5/Oracle.Web/Oracle.Web.EXE。日志:正在尝试下载新的 URL 文件:///C:/blah/HR/ForHR/HRWS/bin/Oracle.Web.EXE。日志:正在尝试下载新的 URL 文件:///C:/blah/HR/ForHR/HRWS/bin/Oracle.Web/Oracle.Web.EXE。日志:所有探测 URL 都尝试并失败。
QUESTION: Does anyone have any ideas as to why I'm having this issue?
问题:有没有人知道我为什么会遇到这个问题?
采纳答案by Mike Marks
I'm not exactly sure why this didn't work, but what I did was simply install the 32-bit and 64-bit versions of ODAC 11.2 Release 5, which took care of registering all required assemblies in the GAC, among several other tasks I'm sure. Once installed, I ran the app, and it worked fine. Thanks to all that have contributed to this.
我不确定为什么这不起作用,但我所做的只是安装 ODAC 11.2 第 5 版的 32 位和 64 位版本,它负责在 GAC 中注册所有必需的程序集,以及其他几个任务我确定。安装后,我运行了该应用程序,并且运行良好。感谢所有为此做出贡献的人。
回答by Sanjeev Rai
You need enable it for 32 bit application in the application pool your website from IIS.
您需要从 IIS 为您网站的应用程序池中的 32 位应用程序启用它。
open IIS>application pool> Enable 32 bit application= true
打开IIS>应用程序池>启用32位应用程序=真