c# - 无法加载文件或程序集 'Oracle.Web, Version=2.112.1.0... The system cannot find the file specified. (It' 已加载到我的 GAC 中)

标签 c# asp.net oracle dll .net-assembly

我正在尝试运行我的 Web 应用程序,它引用了 Oracle.Web,它已经加载到我的 GAC 中:

enter image description here

当我运行我的网络应用程序时,我收到错误消息:

enter image description here

Oracle.Web DLL 是 32 位的。

编辑:这是 Oracle.Web 的程序集绑定(bind)失败日志的打印输出。基本上,它无法从 GAC 加载:

* 程序集 Binder 日志条目(6/19/2013 @ 10:20:49 AM)*

操作失败。 绑定(bind)结果:hr = 0x80070002。系统找不到指定的文件。

程序集管理器加载自: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.

问题:有人知道我为什么会遇到这个问题吗?

最佳答案

您需要从 IIS 为网站的应用程序池中的 32 位应用程序启用它。

打开IIS>应用程序池>启用32位application=true

关于c# - 无法加载文件或程序集 'Oracle.Web, Version=2.112.1.0... The system cannot find the file specified. (It' 已加载到我的 GAC 中),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17194832/

相关文章:

c# - 帮助消除 friend /内部人员

python - cx_Oracle.NotSupportedError : Python value of type NAType not supported

c# - 运行涵盖此方法/类的所有测试

c# - 读取 ConfigurationSectionGroup 中的属性

C# MySQL - "Update"正在选择每一行/所有内容

jquery - ASP.net 复选框列表未获取选中值

c# - ODP.net 是否在连接关闭时关闭引用游标?

Oracle:为什么我必须使用 TO_DATE 来提取数据?

c# - 逐步构建 OR 查询表达式

c# - 将 gridview 导出到 Excel 时无法识别阿拉伯字符