0
votes

When I run my asp.net app I get the error

The type ‘System.Web.UI.ScriptManager’ is ambiguous:

I am having the same problem this person is having http://forums.asp.net/t/1313257.aspx , when I change the 1.0.61025.0 to 3.5 and re-compile It resets it to 1.0.61025.0

what I can I do to resolve this. I've been trying to get my app running for hours now.

Thanks

Edit ~ HELPPpppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp

I see 2 system.web.extensions in the GAC. I tried to remove with gacutil.exe /u system.web.ext ensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Microsoft (R) .NET Global Assembly Cache Utility. Version 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved.

Unknown option: Version=1.0.61025.0 what am I doing wrong.

Edit ~ MY SOLUTION

I went to "Add Remove Programs" and un-installed the Ajax Web Extensions 2.0 version 1.0.61025.0

4

4 Answers

1
votes

It looks like you are (perhaps indirectly) referencing the old System.Web.Extensions DLL. Check your config file and search your application for "System.Web.Extensions". Also make sure the old version is not in your bin folder (and does not get copied there).

Make sure you are not using any other libraries that use the old System.Web.Extensions DLL, ie the AJAX Toolit 1.0.x.

1
votes

You need to comment out the old references to System.Web.Extensions and System.Web.Extensions.Design and add in 3.5 ones in your web.config:

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

To prevent them from being added back, you'll need to do the removal of the 1.0 versions from the GAC using gacutil:

    C:> cd C:\Program Files\Microsoft Visual Studio 8\SDK\bin
    C:\Program Files\Microsoft Visual Studio 8\SDK\bin>gacutil /u "System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"

If you have to remove a reference, you could try

    gacutil /u /r "System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" FILEPATH C:\WINDOWS\system32\msiexec.exe "Windows Installer"

http://msdn.microsoft.com/en-us/library/ex0ss12c(v=VS.71).aspx would be your reference on syntax. The above was what I tried to get rid of a reference to the DLL from Windows Installer, but it didn't work since it was a registry reference, not a FILEPATH one, or one FILEPATH could remove, I guess. Whatever I needed, it wasn't provided on the site. So a-hunting I went in the registry for "System.Web.Extensions". I found entries for it, and its "Designs" version under HKEY_CURRENT_USER\Software\Microsoft\Installer\Assemblies\Global. After I deleted the 2 entries, I could remove them using the first gacutil command I have up there just fine (re-running it for the "Designs" one). &%$# Microsoft!!!

-Tom

P.S. If you don't have the SDK for VS 2005, you can also get to gacutil at C:\WINDOWS\Microsoft.NET\Framework\v1.1*. Or just go to C:\WINDOWS\Assembly and find the right ones (careful!!) and press Delete.

P.P.S. You may get one of those "ambiguous reference" errors if you have the AJAX Control Toolkit and it's auto-refreshing the 1.0 DLLs into your Bin - it might not know whether to use the GAC or your Bin for the 3.5 DLLs. In this case, I had to add these entries to the top of my ASPX page:

    <%@ Assembly Name="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" %>
    <%@ Assembly Name="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" %>

I probably just as easily could have made them 1.0 versions and seen if that would've worked...

0
votes

Update your project reference and clean out your bin directory. Asp.net is loading the previous version of AJAX from bin

Make sure you remove: - System.Web.Extensions.dll - System.Web.Extensions.Design.dll
- old versions of AjaxToolkit.dll

0
votes

A newer alternative to solve this is to add this to the web config