In a recent ASP.NET project, we had to replace NLog (excellent logging .Net library, by the way) assembly with newer one.
However, due to complexity of project, recompiling of all dependent assemblies was not an option. Suggested solution was simple – use assembly redirection:
publicKeyToken="5120e14c03d0593c" culture="neutral" />
<bindingRedirect oldVersion="18.104.22.168" newVersion="22.214.171.1245" />
(all of this under <configuration> tag)
In a first attempt, it did not work – assembly redirection did not happen. Even Fusion Viewer could not find anything strange – it looked like whole redirection part was simply ignored.
I looked (very simple) web.config again, carefully inspecting it; one line, at very top of the file, looked suspitious:
After removing name space, and leaving usual:
all worked as a charm.
It turns out, that due bug in Visual Studio 2005, if you used in some point the built-in web administration tool (launched via the WebSite->ASP.NET Configuration menu item) it will add this name space to root configuration element. This will cause not just to stop Intellisense working for Web.Config but also will ignore any Assembly Binding redirection instructions.
So, if you have problem with Assembly Binding redirection in your ASP.NET application, check web.config once more