title: Running Oracle on Windows 2008 R2 64-bits and WCF
body: <p>I'm trying to deploy to a Windows 2008 R2 64-Bits server running AppFabric a WCF 4.0 service that connects to an Oracle 10gR2 database. On my Windows 7 64-Bits, inside Visual Studio 2010, everything goes well.
  I first started using Oracle ODP.NET and, on deploy, I started getting the:</p>
  
  <pre><code>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'
  </code></pre>
  
  <p>I tried so many things, and nothing seemed to work, and since I'm kinna desperate to get this working, and went to OracleClient, despite the fact that it's marked as deprecated, just to get this working, and buy me time. I removed everything I had installed, but installed just the win64_11gR2_client.zip, with the runtime option. However, than I started getting:</p>
  
  <pre><code>System.DllNotFoundException: Unable to load DLL 'oramts.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
  </code></pre>
  
  <p>So I reinstalled the win64_11gR2_client.zip, adding the Oracle Services for Microsoft Transaction Server component. But then, whenever I made a call to my WCF service, IIS would crash with the error below:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>If I tried to change the AppPool to enable 32-bits application, the WSDL doesn't even get generated, and I get the:</p>
  
  <pre><code>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.
  </code></pre>
  
  <p>I'm lost, and I don't know what to do. How can it be this hard to do a "simple" and typical Oracle set up? What problem would I try to solve? Does anyone know of a blog post that would show how to correctly set this up? I tried looking, but coudln't find anything, and I'm sure I'm not the only one with this problem <br/> 
  Well, any help would be really appreciated. Tks so much</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I'm back trying to use the ODP.NET, since of all the problems that came up trying to use Microsoft's OracleClient. I installed OPD.NET2 64 bit on my development machine, on the project's Reference, I removed the 32-bit reference, and manually reference the 64-bits Oracle.DataAccess.dll. Whenever I do this, I'm unable to use the solution on my Dev Machine, since I get the error:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>This is probably due to the fact that it tries to load the 32-bit ODAC, instead of the 64-bit one. But, after I deploy to my 64-bit server, I stop getting the FileNotFoundException, but I start getting:</p>
  
  <pre><code>System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception. ---&gt; 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 ---
  </code></pre>