.net - Strange section in web.config -


i noticed in 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 this?

thanks

this binding redirect , escape hatch .net's usual desire bind referenced assembly exact version built against. normally, if program built against version x of particular dll, .net try load version x, if newer version available. avoid surprises due changes of behaviour (including bug fixes!) in newer versions. binding redirect specifies policy, saying .net should load version specified in "newversion" instead.

this particular redirect tells program: when assembly tries load version of system.web.extensions.dll version number between 1.0.0.0 , 1.1.0.0, don't load version asked for: load version 3.5.0.0 instead.

(in case, "program" == "web site.")

it's used force program use more recent dll version 1 built against, without recompiling against more recent version.


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -