Ask a questionAsk a question
 

QuestionAjax 2005 & 2008 side by side?

  • Monday, August 13, 2007 1:56 AMFrenchiInLA Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I have successfully installed VS 2008, and tried to make some Ajax web page. I added a ScriptManager from Toolbox its version is 3.5.0.0. ihave the following entries in web.config as well : 

    Code Snippet

     

     

     

    When  I ran the page I got the following error:

     

    Code Snippet
    Compiler Error Message: CS0433: The type 'System.Web.UI.ScriptManager' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll'

     

     

    Samething for ScriptManager


    Code Snippet
    'System.Web.UI.ScriptManager' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll'

     

     

    Have you ever seen this error before? Any help would be greatly appreciated.  

All Replies

  • Thursday, September 20, 2007 3:38 PMChicago Lar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    I ran into the same error. In my case it was caused because I created an Ajax-enabled web site using VWDE 2008 with the Ajax version 3.5 tool kit. Then, when I discovered I couldn’t publish the site with Ajax 3.5 (which is beta) and had to revert to version 1.0

     

    There’s a couple of things at play here. If you started the site in Ajax 3.5 but converted it to 1.0, Ajax may still go to the 3.5 DLL, even if you’ve specified version 1.0 in your web.config file.

     

    There’s an article which describes the problem, provides a workaround, and how to get 3.5 to coexist with 1.0. You can find it here:

     

    http://blogs.msdn.com/webdevtools/archive/2007/07/30/using-vs-2008-to-target-asp-net-ajax-1-0.aspx

     

    In my case, to eliminate the problem, I had to delete the Ajax DLL from the bin folder in my web site, then reference the Ajax 1.0 DLL, which added it back into my bin folder.

     

    Make sure you get the latest version of the toolkit however, for I was told there was an issue with the previous one.

     

    Next I had to convert all the references to 3.5 to 1.0 in my web.config file. Basically, converting:

     

    Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35 

                              -- to --

    Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

     

    Actually, what I did was to save a copy of the 3.5 web.config and copy a 1.0 web.config from another web site. Then I copied my connection strings from the 3.5 file and pasted them over those in the 1.0 web.config.

     

    Anyway, I hope this helps.

     

    Good luck!

     

    Lar