Use Case
You have a brand new IIS servers that has .Net 3.5 installed and are migrating sites to the new servers. In the process of migrating sites you come across some sites that get an error about the version of AJAX libraries being references in the web.config. In the web.config all the entries reference 1.0.61025.0, but the older version of the AJAX libraries are not installed on the new servers, only the latest version is installed that comes with .Net 3.5. So what are the options to fix this issue.
Solutions
1) Install the older version of the AJAX Libraries: Although this works, IMO it is never a great idea to install an older version of a library after a newer version has been installed. Plus, if all new application use the latest versions, is it worth the effort of installing the older version for a few legacy applications?
2) Update the web.config files so all references use latest version (3.5.0.0): This option is very time consuming and error prone. In addition, you will also have to update any pages where there is a register tag for the older libraries as well. This would require you to redeploy any application that have this issue.
3) Use the Configured Assembly capabilities of .Net (aka: Assembly Bindings) to make any application that uses the older AJAX libraries to use the new AJAX libraries. IMO, this is the easiest, quickest and least invasive way to fix the issue. Below are the steps to implement this fix.
Solution #3
Do the following steps on the IIS servers that the issue is occurring. The 2 assemblies that need assemblies bindings created are: System.Web.Extension & System.Web.Extensions.Design
1) Go to Start - > All Program -> Administrative Tools -> Microsoft .NET Framework 2.0 Configuration.
2) Right click on 'Configured Assemblies' to view list of configured assemblies.
3) Left Click on right pane to bring up menu and choose 'Add'.
4) Make sure 'Choose and assembly from the assembly cache is checked' and click the 'Choose Assembly' button.
5) Choose System.Web.Extension (does not matter what version).
6) Click the 'Finish' button.
7) Binding Policy Tab
- Enter Requested Version = 1.0.61025.0
- Enter New Version = 3.5.0.0
8) Repeat steps 2-7 for the System.Web.Extensions.Design assembly.
-------------------------------------------------------------------------------------------------------------------------
Note: If 'Microsoft .NET Framework 2.0 Configuration does not exist under Admin tools use mmc to access it (see below)
1) Start -> Run -> Enter MMC
2) File - > Add/Remove Snap-In then Click "Add" button
3) Choose '.Net 2.0 Configuration' then click 'Add' button and then the 'Close' Button.
4) On 'Add/Remove Snapin' windows click the 'OK' Button.
5) Expand the tree on the right and you can start following the directions above for adding the configured assemblies.
--------------------------------------------------------------------------------------------------------------------------
No comments:
Post a Comment
Suggestions are invited from readers