简体   繁体   English

部署 WCF 服务问题?

[英]Deploying WCF service problems?

I have a WCF service written and working on my development machine.我有一个 WCF 服务在我的开发机器上编写和工作。 It's a simple service that takes it's parameters and puts them into an Oracle Database.这是一个简单的服务,它接受它的参数并将它们放入 Oracle 数据库中。 All aspects have been tested and working fine on my 32 bit development machine.所有方面都已经过测试并且在我的 32 位开发机器上运行良好。 When I compile and place the service in our 64 bit development server (running IIS 6) for proper testing, the test client gets this error:当我编译并将服务放入我们的 64 位开发服务器(运行 IIS 6)以进行正确测试时,测试客户端收到此错误:

Could not load file or assembly 'Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies.无法加载文件或程序集 'Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342' 或其依赖项之一。

The client does not use Oracle.DataAccess.dll at all, it's an error returned by the service.客户端根本没有使用Oracle.DataAccess.dll,这是服务返回的错误。 In VS2010, I've set that the reference does not require a Specific Version.在 VS2010 中,我设置了引用不需要特定版本。 However, even with that set, it tells me exactly what version it can't find.然而,即使有那一套,它也能准确地告诉我它找不到哪个版本。 I've tried adding the 32 bit and 64 bit version of the DLL into the bin directory of the service one at a time, but neither fixes the issue.我尝试一次将 DLL 的 32 位和 64 位版本添加到服务的 bin 目录中,但都不能解决问题。

If I understand right, it should work without either of those DLLs in the bin folder because the GAC already has the proper DLL in it from other projects on the server.如果我理解正确,它应该可以在 bin 文件夹中没有这些 DLL 的情况下工作,因为 GAC 已经从服务器上的其他项目中获得了正确的 DLL。 What can I do to fix this?我能做些什么来解决这个问题?

More Details: If I include the 32 bit DLL in the bin folder I get this error:更多详细信息:如果我在 bin 文件夹中包含 32 位 DLL,我会收到此错误:

Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies.无法加载文件或程序集“Oracle.DataAccess”或其依赖项之一。 An attempt was made to load a program with an incorrect format.试图加载格式不正确的程序。

If I include the 64 bit DLL in the bin folder I get this error:如果我在 bin 文件夹中包含 64 位 DLL,我会收到此错误:

Could not load file or assembly 'Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies.无法加载文件或程序集 'Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342' 或其依赖项之一。 The located assembly's manifest definition does not match the assembly reference.找到的程序集的清单定义与程序集引用不匹配。 (Exception from HRESULT: 0x80131040) (来自 HRESULT 的异常:0x80131040)

The top answer on this question may be what you're looking for: Targeting both 32bit and 64bit with Visual Studio in same solution/project这个问题的最佳答案可能是您正在寻找的内容: 在同一解决方案/项目中使用 Visual Studio 定位 32 位和 64 位

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

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