0

I have a WCF Service hosted at my server and it is being consumed by client from another server.

I did few changes in the code and tried deploying the code after successful build.

Previously the application pool was set to 32 bit as true but the service opens correctly when i make that 32 bit as false.

Currently it is set to 32 bit true and working fine in QA but when i build it and deploy and run the service manually it fails at opening the oracle connection and throws this error "Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed"..

below is the link to the image of what settings i used in visual studio to build the solution.From the many project folder the yellow highlighted one is the startup project which is set to 64bit and all others as any cpu

https://ibb.co/xgbWHNG

I am not sure if i am doing anything wrong with the build for which the oracle gives this error while running the service.the application pool should be set to 32 bit

TheSacredKiller
  • 121
  • 3
  • 8
  • I am not entirely sure about your scenario but on the IIS you have to set the application pool to run on 32 bits mode. – Felipe Oriani Aug 12 '19 at 20:15
  • its set to 32 bit mode and therefore do you think any changes i need to do while building the solution? – TheSacredKiller Aug 12 '19 at 20:46
  • 1
    Well, there are a lot of oracle providers on the market, can you post the link of what you are using? I recommend you to use the `Oracle.ManagedDataAccess.Client`. It is a modern one and support 32 and 64 bits. – Felipe Oriani Aug 12 '19 at 20:51
  • The error message is quite clear. You need to install the 64-bit Oracle client. If you need both, the 32-bit client and the 64-bit client, follow this instruction: https://stackoverflow.com/questions/24104210/badimageformatexception-this-will-occur-when-running-in-64-bit-mode-with-the-32#24120100 – Wernfried Domscheit Aug 13 '19 at 05:41
  • it is already working fine with 64 bit installed with application pool set to 32 bit as true and the problem is i am doing few changes to code and deploying again and that time this throws this error-- so what i am thinking is this might be some configuration or setting issues? – TheSacredKiller Aug 13 '19 at 06:46
  • Thanks all.. Its working now..I have to set the project debug to x86 and build and post which it worked as before.. – TheSacredKiller Aug 13 '19 at 08:09

0 Answers0