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

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

我已在IIS 7.0 Windows Server 2008 R2 64位上安装了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?

推荐答案

使用带有Xcopy部署的11.2发行版3(11.2.0.2.1)"版本的Oracle数据访问组件安装过程似乎已损坏.要解决此问题,您必须在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:\Windows\assembly\GAC_32\Oracle.DataAccess\4.112.2.0__89b483f429c47342\ copy %ORACLE_HOME%\odp\bin\4\Oracle.DataAccess.dll C:\Windows\assembly\GAC_32\Oracle.DataAccess\4.112.2.0__89b483f429c47342\ md C:\Windows\assembly\GAC_32\Oracle.Web\4.112.2.0__89b483f429c47342\ copy %ORACLE_HOME%\asp\bin\4\oracle.web.dll C:\Windows\assembly\GAC_32\Oracle.Web\4.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%\odp\bin\4\Oracle.DataAccess.dll gacutil /i %ORACLE_HOME%\asp\bin\4\oracle.web.dll

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

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

希望这会有所帮助.

P.S.或者,您可以尝试此

P.S. Or you can try this.

更多推荐

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

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

发布评论

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

>www.elefans.com

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