Thursday, September 16, 2010

Ajax assembly version conflicts and resolution

The following could be faced during your Staging to Production movement or Implementation server.

System.Web.Script.Services.ScriptMethodAttribute exists in both 'C:\Windows\Microsoft.Net\Framework64\v2.050727\Temporary ASP.Net....' 
and C:\Windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0_...'

BindingRedirects


First step is to clear the Temporary ASP.Net folder and try, even then you face the same error message, spend some time in the below described.

When you build a .NET Framework application against a strong-named assembly, the application uses that version of the assembly at run time by default, even if a new version is available. However, you can configure the application to run against a newer version of the assembly.

You can redirect more than one assembly version by including multiple elements in a element.

The following example shows how to redirect one assembly version to another.



Visual Studio 2008 automatically adds binding redirects in the web.config file
This solves many of the interoperability issues and nothing wrong in creating applications with reference to System.Web.Extensions of older version (v1.0) with VS2008

No comments: