Failed to Load file or assembly "Oracle. DataAccess" or one of its Dependencies. Attempt to load program with incorrect format, oracle assembly
. NET: Microsoft Visual Studio 2010 +. NET Framework 3.5
Operating System: Windows R2 64-bit Operating System
Oracle Database: 32-bit ODP. NET 2.0
FluroineFx: FluorineFx v1.0.0.15 (click to download)
When a FluorineFx application is published to iis, the following message is displayed: "failed to Load file, assembly" Oracle. DataAccess ", or a dependency of FluorineFx. Attackers try to load programs with incorrect format. ".
The.. net to access the Oracle database of oralcle. dataAccess. dll replication is not set to true locally (this reference is found in the project reference, right-click the copy local property "). it will not be automatically copied to the bin directory during all releases. As a result, the above error cannot be loaded. As shown in:
Either modify the reference attribute in the project, or copy the dll directly to the bin directory published on the server. My iis server is 64-bit, and my odp.net is 32. Therefore, the corresponding Oracle. DataAccess. dll should also be 32-bit. The iis configuration is involved here. Oracle. DataAccess. dll is 32-bit, and the system is 64-bit.
This configuration in iis is as follows: First, check which application pool is used by the project:
Then go to the application pool to configure, first find the Test application pool
Right-click Advanced Settings
Set to enable the 32-bit application to true
OK. Everything is normal.
Note that the Test application pool here chooses the classic pipeline mode in the Basic settings.