views:

25

answers:

1

Hello everybody,

I'm using the "bindingRedirect" element in my web.config to allow updates of my referenced assembly without recompiling my website. But I still receive the same error:

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

I built my website with version 2.111.6.20 of "Oracle.DataAccess". After that I installed a version 2.102.4.0 of "Oracle.DataAccess" which is installed to the GAC. When accessing the website, the error above is shown.

I read that it's possible to redirect assemblies to newer versions with the "bindingRedirect" element in the web.config. My web.config looks like this:

<runtime> 
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
     <dependentAssembly> 
           <assemblyIdentity
                  name="Oracle.DataAccess"
                  publicKeyToken="89b483f429c47342"
                  Culture="neutral"> 
              <bindingRedirect
                  oldVersion="2.111.6.20"
                  newVersion="2.102.4.0" />                             
           </assemblyIdentity>             
     </dependentAssembly>               
  </assemblyBinding> 
</runtime>

But even with that element, the error is still shown!

I tried to change this line to as mentioned in some forums, but it's still not working.

Does anybody know a solution for my problem?

+1  A: 

There might be a publisher policy file that overrides your binding redirect. Find out by using Fuslogvw.exe to see what policies are applied.

Hans Passant