使用ODP.NET 64位的.NET Web服务 [英] .NET Webservice using ODP.NET 64bit
问题描述
我在.net4.0中创建了一个Web服务.它通过ODP.NET4连接到oracle数据库.仅供参考,我使用了ODAC112021Xcopy_X64并安装了odp4和asp4.该服务在开发环境中运行良好.
I created a web service in .net4.0. It connects to an oracle-database by ODP.NET4. FYI I used ODAC112021Xcopy_X64 and installed odp4 and asp4. The service runs well in development environment.
但是将其发布到在同一台计算机上运行的IIS之后,出现以下异常:
But after publishing it to IIS running on the same machine I get the following exception:
System.ServiceModel.FaultException`1 was unhandled
Message=Could not load file or assembly 'Oracle.DataAccess, Version=2.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source=mscorlib
StackTrace:
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]
我使用64位odp.net,我在64位Windows Server 2008 R2上运行,并在Visual Studio中切换到64位.
I use 64bit odp.net, I'm running on Windows Server 2008 R2 64bit and switched to 64bit in Visual Studio.
有人可以告诉我我想念什么或做错什么吗?
Can anybody tell me what I'm missing or doing wrong?
我还尝试将ORACLE.DATACCESS.dll
复制到bin文件夹.
I also tried to copy the ORACLE.DATACCESS.dll
to the bin folder.
预先感谢
推荐答案
检查编译器计算机(32/64位)中的ODAC目标平台是否与放置Web服务的生产服务器相同.
Check if ODAC target platform in your compiler machine (32/64 bit) is the same of production server where you put your web services.
这篇关于使用ODP.NET 64位的.NET Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!