Friday, 19 November 2010

Crystal Reports - Could not load file or assembly 'System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies

I was upgrading an old ASP project that used crystal reports and came across the following error:

Could not load file or assembly 'System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.

This was caused by the project being upgraded to use .net 3.5. As i wanted to use .net 3.5 i could not downgrade it to version 2.0. Luckily I found some information on the web for assembly binding redirection that is configured in the web.config. Making the changes below solved the problem.

old web.config entry

new web.config entry


This is basically telling ASP to redirect calls to any System.Web.Extensions dll from version 1 to version 3 to go to version 3.5. Before it was only redirecting .net 1 and .net 1.1 calls to .net 3.5.

No comments:

Post a Comment