Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6718977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:02:16+00:00 2026-05-26T09:02:16+00:00

I’ve been trying to deploy a c# console app that I made to a

  • 0

I’ve been trying to deploy a c# console app that I made to a server. I have basically been copying the contents of the Release folder over to the server, and everything seems to work smoothly except for Oracle. On my development machine (32 bit XP) I have OracleClient 11.2, and the server (64 bit server 2008) has 11.1. The application works if I run it from on local machine.

When I deploy by just copying the Release folder and trying to run the application, I get the following error:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Oracle.DataAccess, Version=2.111.7.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
File name: 'Oracle.DataAccess, Version=2.111.7.0, Culture=neutral, PublicKeyToken=89b483f429c47342'
   at PDV.AODGateway.StoredProcedures..ctor()
   at PDV.AODGateway.AODGateway.Export()
   at PDV.AODGateway.AODGateway.Main(String[] args)

(don’t read too much into it looking for the 111.7 version. It says that because I tried specifying in app.config to look for that version. Previously it said it couldn’t find 112.1)

The section of code it is failing at is where I create an OracleConnection object.

If I try to copy the dll into the deployment folder from the server, I get a similar error:

Unhandled Exception: System.TypeInitializationException: The type initializer for 'PDV.AODGateway.StoredProcedures' threw an exception. ---> System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=2.111.7.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 'Oracle.DataAccess, Version=2.111.7.0, Culture=neutral, PublicKeyToken=89b483f429c47342'
   at PDV.AODGateway.StoredProcedures..cctor()

I have eventually solved the problem by copying these files from the oracleclient folder on my development machine (i.e. the machine I used to build the solution) into the directory of the application on the server:

Oracle.DataAccess.dll
oci.dll
OraOps11w.dll
oraociei11.dll

However, this seems like extremely bad practice, so do any of you have suggestions on how I could get around having to do this? Have any of you run into this issue before?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:02:17+00:00Added an answer on May 26, 2026 at 9:02 am

    I’ve run it similar issues with the Oracle Data Access Components before. My guess is that you built your .exe using the AnyCPU platform target in your console application’s build configuration. This means that when it’s run on your 32-bit development machine it will be loaded into a 32-bit process whereas on the 64-bit server it will be loaded into a 64-bit process. The problem is that the Oracle.DataAccess.dll component comes in two different flavours, a 32-bit and 64-bit version. When you copied the 32-bit version into the deployment bin directory from your development machine, at runtime the application would try to load an assembly explicitly marked as 32-bit into a 64-bit process which doesn’t work and explains why you get the System.BadImageFormatException.

    So perhaps the best solution would be to explicitly target the 64-bit platform in your console app’s project settings for the release configuration and reference the 64-bit version of Oracle.DataAccess.dll. On the server you either need the 64-bit Oracle.DataAccess.dll to be installed in the GAC (which it might have been when the ODAC was installed) or you need to deploy the 64-bit assembly with your application.

    I’ve found this stuff to be a pain when you need to target both platforms.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I am trying to loop through a bunch of documents I have to put
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a bunch of posts stored in text files formatted in yaml/textile (from
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.