views:

1882

answers:

2

I have an application that has been converted from VS2005 2.0 framework to VS2008 3.5 framework. I am attempting to add the ability to use the AjaxControlToolkit DLL [AjaxControlToolkit-Framework3.5SP1-DllOnly.zip] download only within my project. I have followed the configuration setups to get the project to build, and have not been successful in getting a control to load.

How do I install and use the ASP.NET AJAX Control Toolkit in my .NET 3.5 web applications?

and

Configuring ASP.NET AJAX

I am currently running into an error after adding all the web.config settings to my web application.

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Source Error:

<compilation defaultLanguage="vb" debug="true">  
  <assemblies>  
    <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>  
  </assemblies>  
  <expressionBuilders>  
 

I imagine others have had this problem, but can't find any resources that will help me fix this. Thanks in advance for the help.

+1  A: 

That is the old version. Change the line in your web.config to use the 3.5 version:

<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

(Yes, this is a common conversion error.)

Mufasa
A: 

I have this issue a lot from web.config inheritance. You can also add binding re-directs. Below will re-direct any calls to the old version to the new version, you can also set this to work the other way round.

  <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.61025.0" newVersion="3.5.0.0"/>
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
Jon Jones

related questions