ASP.Net部署问题 - 无法加载文件或程序集“Oracle.DataAccess”或其依赖项之一 [英] ASP.Net Deployment problem - Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies

查看:78
本文介绍了ASP.Net部署问题 - 无法加载文件或程序集“Oracle.DataAccess”或其依赖项之一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

描述:ASP.Net项目在调试模式下运行良好。构建之后,项目部署在IIS 7.5中。对于IIS中的已部署项目,我单击了Manage Application>浏览以打开它,但收到错误:

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

在此构建之前,我没有加载Oracle.DataAccess.dll,并且完全没有问题。加载Oracle.Access.dll后,出现了这种类型的错误。然后我尝试清理colution,然后删除/禁用/注释掉Oracle.DataAccess.dll组件,但部署后错误仍然存​​在。这个错误对我来说很奇怪,因为我的项目中没有Oracle.Access。感谢您是否可以为此提供帮助。

Description: An ASP.Net project runs fine in debugging mode. After the build, the project was deployed in IIS 7.5. For the deployed project in IIS, I clicked Manage Application > Browse to open it, but got the error:
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.
Before this build, I did not load Oracle.DataAccess.dll, and there was no problem at all. After I loaded the Oracle.Access.dll, this type of error comes out. Then I tried to clean the colution, and then removed/disabled/commented out the Oracle.DataAccess.dll component, but the error still exists after the deployment. This error is strange to me since there is NO Oracle.Access in my project. Appreciate if you can help for this.

推荐答案

解决方案可能是您检查项目中的references文件夹以及是否有您的Oracle.DataAccess.dll文件简单地删除它并在重建解决方案之后。
The solution could be if you check the references folder in your project and if there is your Oracle.DataAccess.dll file just simple remove it and after rebuild your solution.


通过引用
<a href="https://community.oracle.com/thread/2267977?start=0&tstart=0">https://community.oracle.com/thread/2267977?start=0&tstart=0</a>[<a href="https://community.oracle.com/thread/2267977?start=0&tstart=0" target="_blank" title="New Window">^</a>]

,我设置启用32位应用程序(IIS应用程序池>高级设置)为true。错误消失了。感谢您的评论。

, I set "Enable 32-bit Applications" (IIS Application Pools > Advanced Settings) to "true". The error was gone. Thanks for your review.


这篇关于ASP.Net部署问题 - 无法加载文件或程序集“Oracle.DataAccess”或其依赖项之一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆