无法加载文件或程序集“Oracle.DataAccess"或其依赖项之一.试图加载格式不正确的程序

编程入门 行业动态 更新时间:2024-10-27 10:23:22
本文介绍了无法加载文件或程序集“Oracle.DataAccess"或其依赖项之一.试图加载格式不正确的程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在 IIS 7.0 Windows Server 2008 R2 64bit 上安装了一个 Web 应用程序.我指的是 oracle.DataAccess.dll;当我尝试访问应用程序时,我收到以下消息:无法加载文件或程序集‘Oracle.DataAccess’或其依赖项之一.试图加载格式不正确的程序."有人可以帮帮我吗?

I have installed a Web app on IIS 7.0 Windows Server 2008 R2 64bit. I am referring an oracle.DataAccess.dll; When I try to access the application I get the following message: "Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format." Can anybody help me, please?

推荐答案

使用11.2 Release 3 (11.2.0.2.1) with Xcopy Deployment"版本的Oracle Data Access Component安装过程好像坏了.要解决此问题,您必须在 GAC 中注册缺少的程序集.要为这个特定版本执行此操作,请从管理员控制台中运行以下命令:

It seems the Oracle Data Access Component installation process using the "11.2 Release 3 (11.2.0.2.1) with Xcopy Deployment" version is broken. To fix this you must register the missing assemblies in the GAC. To do this for this specific version run these commands from within an administrator console:

md C:WindowsassemblyGAC_32Oracle.DataAccess4.112.2.0__89b483f429c47342 copy %ORACLE_HOME%odpin4Oracle.DataAccess.dll C:WindowsassemblyGAC_32Oracle.DataAccess4.112.2.0__89b483f429c47342 md C:WindowsassemblyGAC_32Oracle.Web4.112.2.0__89b483f429c47342 copy %ORACLE_HOME%aspin4oracle.web.dll C:WindowsassemblyGAC_32Oracle.Web4.112.2.0__89b483f429c47342

请注意,这仅注册 DLL 的而不是其他语言资源.因此,如果您使用除英语以外的任何其他语言(de、es、fr、it、ja、ko、pt-BR、zh-CHS 和 zh-CHT),那么您还需要使用相应的资源注册这些语言文件.

Note that this registers only the DLL's but not other languages resources. So, if you are using any another language than English (de, es, fr, it, ja, ko, pt-BR, zh-CHS, and zh-CHT), then you need to register these as well using the corresponding resource file.

如果您在机器上安装了 Visual Studio,则可以发出以下命令:

If you have Visual Studio installed on the machine, you can issue the following commands instead:

gacutil /i %ORACLE_HOME%odpin4Oracle.DataAccess.dll gacutil /i %ORACLE_HOME%aspin4oracle.web.dll

注意:在 Visual Studio 安装文件夹下查找 gacutil.exe.

Note: look for gacutil.exe under the Visual Studio installation folder for it.

希望这会有所帮助.

附:或者你可以试试 这个.

P.S. Or you can try this.

更多推荐

无法加载文件或程序集“Oracle.DataAccess"或其依赖项之一.试图加载格式不正确的程序

本文发布于:2023-11-08 10:55:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1569181.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:加载   程序   不正确   或其   格式

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!