Pas*_*cal 4 oracle 64-bit wcf iis-7 windows-server-2008
我正在尝试部署到运行AppFabric的Windows 2008 R2 64位服务器,该服务连接到Oracle 10gR2数据库.在我的Windows 7 64位上,在Visual Studio 2010中,一切顺利.我第一次开始使用Oracle ODP.NET,在部署时,我开始使用:
System.IO.FileNotFoundException: Could not load file or assembly 'Oracle.DataAccess, Version=2.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
File name: 'Oracle.DataAccess, Version=2.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342'
Run Code Online (Sandbox Code Playgroud)
我尝试了很多东西,似乎没有任何工作,因为我非常渴望让这个工作,并且去了OracleClient,尽管它被标记为已弃用,只是为了让它工作,并给我时间.我删除了我安装的所有内容,但只使用运行时选项安装了win64_11gR2_client.zip.但是,我开始得到:
System.DllNotFoundException: Unable to load DLL 'oramts.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Run Code Online (Sandbox Code Playgroud)
所以我重新安装了win64_11gR2_client.zip,添加了Oracle Services for Microsoft Transaction Server组件.但是,每当我调用我的WCF服务时,IIS都会因以下错误而崩溃:
Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2
Faulting module name: ntdll.dll, version: 6.1.7601.17514, time stamp: 0x4ce7c8f9
Exception code: 0xc0000374
Fault offset: 0x00000000000c40f2
Faulting process id: 0xb28
Faulting application start time: 0x01cc0b141a857fac
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 7630c4b0-7707-11e0-8419-00155d010609
Run Code Online (Sandbox Code Playgroud)
如果我尝试更改AppPool以启用32位应用程序,则WSDL甚至不会生成,我得到:
A process serving application pool 'MyAppPool' suffered a fatal communication error with the Windows Process Activation Service. The process id was '2856'. The data field contains the error number.
Run Code Online (Sandbox Code Playgroud)
我迷路了,我不知道该怎么办.如何做一个"简单"和典型的Oracle设置很难?我试图解决什么问题?有谁知道一篇博文会展示如何正确设置它?我试着寻找,但是找不到任何东西,我确信我不是唯一一个有这个问题的人
,任何帮助都会非常感激.Tks这么多
编辑
我回来试图使用ODP.NET,因为试图使用微软的OracleClient的所有问题.我在我的开发机器上安装了OPD.NET2 64位,在项目的Reference上,我删除了32位引用,并手动引用了64位的Oracle.DataAccess.dll.每当我这样做时,我都无法在Dev Machine上使用该解决方案,因为我收到错误:
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.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: 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
Run Code Online (Sandbox Code Playgroud)
这可能是因为它试图加载32位ODAC而不是64位ODAC.但是,在我部署到我的64位服务器后,我停止获取FileNotFoundException,但我开始得到:
System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception. ---> Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client
at Oracle.DataAccess.Client.OracleInit.Initialize()
at Oracle.DataAccess.Client.OracleConnection..cctor()
--- End of inner exception stack trace ---
Run Code Online (Sandbox Code Playgroud)
我删除了32位引用,并手动引用64位Oracle.DataAccess.dll.每当我这样做时,我都无法在Dev Machine上使用该解决方案,因为我收到错误:
Run Code Online (Sandbox Code Playgroud)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. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.BadImageFormatException: 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
我的开发机器上遇到了同样的问题.我在IIS上检查了应用程序池的设置,结果发现"启用32位应用程序"选项已设置为"True".我只在64位应用程序上工作,所以我可以安全地将此选项设置为其默认值:"False".在那之后一切正常.
您可以在IIS 7管理器中更改此设置.右键单击应用程序池,然后选择"高级设置...".它在"(一般)"组中.
归档时间: |
|
查看次数: |
10842 次 |
最近记录: |