Reputation: 103
Could not load file or assembly 'Oracle.DataAccess, Version=9.2.0.700, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
i have developed the application using odac 32 bit version 11.2.0.3.0. where it is working absolutely fine.But deploying into another pc where i installed IIS 7.5 with 32 bit client ersion 11.2.0.3.0 i am always getting the above error.
i have no idea where it is getting oracle.DataAccess, Version=9.2.0.700. I tried whole day to solve the issue. But still no luck. Please help me out of the situation where i am really feeling pathetic.
Upvotes: 4
Views: 25863
Reputation: 96
goto this address and read answer: Could not load file or assembly after upgrading DevExpress
In the solutionExplorer: switched to the File View and changed
CopyLocal = true
for all DevExpress assemblies both in the Server and ServerGenerated projects. It resolves the issue for me. Could you please try it and let me know if that helps?
Upvotes: 1
Reputation: 1341
If you are using ODP.Net check assembly version in gac and which platform it is targeted.You can find that information by opening command prompt from visual studio tools and using the following command
gacutil /l oracle.dataaccess
If the processor architecture is x86 then make sure that your application pool is allowed to run 32 bit version of the assembly.This can be done by right clicking on the respective
application pool->advanced settings->Enable 32 bit Application to true.
Upvotes: 2
Reputation: 103
i finally got the solution. I just need to redirect the assembly to the current one in the web.config file as 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 co-operation and know what feeling big relief.
Upvotes: 4
Reputation: 907
The version and the runtime version are not likely the same, that has messed me up before.
As for the reference, select the reference to Oracle.DataAccess in Solution Explorer on the machine where the project works. Now look at the properties window and check the path.
Finally, go to the machine where it is failing and make sure the same dll is living at the exact same path.
You may also be able to get around this with turning "copy local" on in the properties for the dll, but I don't think that is considered "best practice".
Upvotes: 0
Reputation: 2921
Perhaps you are referencing a dll that is referencing this other version, even though the immediate project is not? Make sure you check there references on all of the dlls.
Upvotes: 0