Showing posts with label Oracle.DataAccess. Show all posts
Showing posts with label Oracle.DataAccess. Show all posts

Thursday, 3 July 2014

Could not load file or assembly 'Oracle.DataAccess, Version=4.121.1.0


Could not load file or assembly 'Oracle.DataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.

It is problem due to application is not pointing to proper DDL of oracle access and your GAC is having different version of Oracle.DataAccess.

To correct this you just need to put the below code into web.config file.

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

By doing this when application is looking to the version which is not exist then it will redirect to the exist DLL version.

Generally by doing this you can work with the two same DDL with dirffrent version and based on the requirement you can call the version of DLL