简体   繁体   English

无法使用WCF服务加载文件或程序集

[英]Could not load file or assembly using WCF service

using: 使用:
- windows app - visual studio - 2008 - windows app - visual studio - 2008
- back end -oracle 11G - 后端-oracle 11G
- web service - visual studio - 2010 - 网络服务 - 视觉工作室 - 2010年
- IIS(Application pools >> Advanced Settings >> Enable 32bit Applications is enabled) - IIS(应用程序池>>高级设置>>启用32位应用程序已启用)

I created a windows application using WCF service. 我使用WCF服务创建了一个Windows应用程序。 When I host the service in my local machine(Using IIS) it works fine. 当我在本地计算机(使用IIS)中托管服务时,它工作正常。 When hosted on server, it shows an error: 托管在服务器上时,它显示错误:

Could not load file or assembly 'Oracle.DataAccess, Version=10.2.0.100, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. 无法加载文件或程序集“Oracle.DataAccess,Version = 10.2.0.100,Culture = neutral,PublicKeyToken = 89b483f429c47342”或其依赖项之一。 The located assembly's manifest definition does not match the assembly reference. 定位的程序集的清单定义与程序集引用不匹配。

Help me to solve the problem 帮我解决问题

I would guess that your server has a different version of the Oracle.DataAccess assembly installed in the GAC. 我猜你的服务器在GAC中安装了不同版本的Oracle.DataAccess程序集。 Are you able to confirm what version is installed on the server? 您是否能够确认服务器上安装的版本?

Also, see this previous question: The located assembly's manifest definition does not match the assembly reference 另外,请参阅前一个问题: 找到的程序集的清单定义与程序集引用不匹配

Check the following, 检查以下内容,

  1. Check the version of the dll you have placed and the version you application has reference to. 检查version已放置的dll和版本,应用程序参照。

  2. First check if you have installed Oracle client(ODAC) in the web server. 首先检查您是否在Web服务器中安装了Oracle client(ODAC) Without oracle client your application will not load the assembly. 没有oracle客户端,您的应用程序将不会加载程序集。

  3. If it has Oracle client installed then check whether its 32 or 64 bit and your application should have reference to same bit version of the assembly. 如果已安装Oracle客户端,请检查其32 or 64 bit以及您的应用程序是否应引用该程序集的相同位版本。

  4. Also IIS 32bit Enabled property should match the Oracle DataAccess dll your application referencing. IIS 32bit Enabled属性也应与您的应用程序引用的Oracle DataAccess DLL相匹配。 ( Basically processor architecture of Oracle Client installation in the server, Oracle.DataAccess dll and IIS enabled bit version should be same. either 32 or 64 ) 基本上在服务器中安装Oracle客户端的处理器体系结构,Oracle.DataAccess dll和启用IIS的位版本应该相同.32或64

  5. Check the GAC and remove if there is any other Oracle DataAccess dlls. 检查GAC并删除是否有任何其他Oracle DataAccess dll。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM