Error using oracle.dataaccess.dll

后端 未结 5 1526
生来不讨喜
生来不讨喜 2020-12-31 18:28

I have a web application which uses Oracle.DataAccess.dll to communicate with an Oracle db. The web application deployed on 32 bit windows system works but not on windows se

5条回答
  •  春和景丽
    2020-12-31 19:11

    Same here. The Oracle.DataAccess assembly doesn't run in 64 bit mode.

    You should set the application pool for your site to 32 bit mode (go to the application pool's Advanced Settings and set Allow 32 Bit Applications to "True")

    If that doesn't work, make sure your Oracle directory (the directory containing all the Oracle dlls) is in your system path. If you forget that, you get the same cryptic error about not finding Oracle.DataAccess.

    EDIT:

    Installing the Oracle client can be a major pain. Using the Oracle Instant Client is somewhat easier than installing the full client, so this is what I usually do:

    1. Download the Oracle Instant Client
    2. Unzip the archive in c:\oracle (any other directory will do)
    3. Open a command prompt as administrator
    4. type cd \oracle
    5. type configure odp.net20 myhome
    6. Right-click on "My Computer", "Advanced System Settings", "Environment Variables" and add the C:\oracle directory to the system path
    7. Copy the Oracle.DataAccess.dll file from c:\oracle\odp.net\bin\2.x to your application's bin folder
    8. (optonally) edit your c:\oracle\tnsnames.ora file

提交回复
热议问题