Failed to load file or assembly 'Oracle.DataAccessVersion = 9.2.0.700, Culture = neutral, PublicKeyToken = 89b483f429c47342'

Failed to load file or assembly "Oracle.DataAccess, Version = 9.2.0.700, Culture = neutral, PublicKeyToken = 89b483f429c47342" or one of its dependencies. The located assembly manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I developed an application using odac 32-bit version 11.2.0.3.0. where he works absolutely fine. But deploying to another PC, where I installed IIS 7.5 with the 32-bit ersion 11.2.0.3.0 client, I always get the above error.

I do not know where it gets oracle.DataAccess, Version = 9.2.0.700. I tried all day to solve the problem. But still no luck. Please help me in a situation where I really feel miserable.

+4
source share
5 answers

Finally, I got a solution. I just need to redirect the assembly to the current one in the web.config file, as shown below:

<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89B483F429C47342" culture="neutral"/> <bindingRedirect oldVersion="9.2.0.700" newVersion="4.112.3.0"/> </dependentAssembly> </assemblyBinding> </runtime> 

Thank you all for your kind cooperation and I know what a feeling of great relief.

+3
source

If you use the ODP.Net build version to verify the build in gac and which platform it targets. You can find this information by opening a command line from visual studio tools and using the following command

 gacutil /l oracle.dataaccess 

If the processor architecture is x86, then make sure that the application pool is allowed to run the 32-bit version of the assembly. This can be done by right-clicking the appropriate

  application pool->advanced settings->Enable 32 bit Application to true. 
+2
source

Perhaps you are referencing a DLL referencing this other version, although the immediate project is not? Make sure you check the links to all DLLs.

0
source

The version and execution version are not always the same, which spoiled me before.

For the link, select the link for Oracle.DataAccess in Solution Explorer on the machine where the project is running. Now view the properties window and check the path.

Finally, go to the machine where it does not work, and make sure that the same DLL lives in the same path.

You can also get around this by including "copy local" in the properties for the dll, but I don't think this is considered "best practice."

0
source

go to this address and read the answer: Failed to load the file or assembly after updating DevExpress

In the solutionExplorer: switched to the file view and changed

 CopyLocal = true 

for all DevExpress assemblies both in the Server and Projects with the server . This solves the problem for me. Could you try and let me know if this helps?

0
source

Source: https://habr.com/ru/post/1411332/


All Articles