I noticed this in my web.config:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
What exactly is this?
Thanks
This is a binding redirect and is the escape hatch from .NET’s usual desire to bind a referenced assembly to the exact version it was built against. Normally, if a program is built against version X of a particular DLL, then .NET will try to load version X, even if a newer version is available. This is to avoid surprises due to changes of behaviour (including bug fixes!) in newer versions. A binding redirect specifies another policy, saying that .NET should load the version specified in “newVersion” instead.
This particular redirect tells the program: when an assembly tries to load a version of System.Web.Extensions.dll with a version number between 1.0.0.0 and 1.1.0.0, don’t load the version that was asked for: load version 3.5.0.0 instead.
(In this case, “program” == “Web site.”)
It’s usually used to force a program to use a more recent DLL version than the one it was built against, without recompiling it against the more recent version.