我在.net4.0中創建了一個Web服務。它通過ODP.NET4連接到一個oracle數據庫。 FYI我使用ODAC112021Xcopy_X64並安裝了odp4和asp4。該服務在開發環境中運行良好。使用ODP.NET 64位的.NET Web服務
但它發佈到IIS在同一臺機器我得到下面的異常運行後:
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,我在Windows Server 2008 R2的64位運行,切換到64位視覺工作室。
有人可以告訴我我失蹤或做錯了什麼嗎?
我也嘗試將ORACLE.DATACCESS.dll
複製到bin文件夾中。
在此先感謝