The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

If you are trying to migrate an old application to work with the framework 3.5,  you are using ajax, and get the following error...

 The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll' or from assembly 'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll'. Please specify the assembly explicitly in the type name.

 

You need to delete all your \bin files and rebuild the application.

 

 

Published Wednesday, January 30, 2008 10:58 PM by Javier.Villarreal
Filed under:

Comments

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Thursday, January 31, 2008 3:10 AM by Joe Chung

You can add assembly binding redirects to your Web.config to avoid this problem coming back after you delete your /bin files and rebuild.  What it does is redirect any requests for the 1.0 version of AJAX for ASP.NET to the 3.5 version.

<runtime>

 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

   <dependentAssembly>

     <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>

     <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>

   </dependentAssembly>

   <dependentAssembly>

     <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>

     <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>

   </dependentAssembly>

 </assemblyBinding>

</runtime>

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Wednesday, April 02, 2008 11:20 AM by Mohammad Kashif Nadeem

Problem solved. Thanks for your help.

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Wednesday, May 21, 2008 9:36 AM by Ivan

Also make sure to check C:\Windows\assembly.  

If you see both 1.0 and 3.5, remove one of them.  

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Tuesday, May 27, 2008 12:23 PM by ruben valenzuela

In our case we're having the same problem on a .NET 2.0 framework based application.

Can't we just tell IIS/.NET to use the 2.0 version for this application? Avoiding rebuilding everything.

Some extra information: We have applications running on 3.5 and 2.0 which should share the same website but would use different application memory pools.

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Friday, August 15, 2008 9:28 AM by pepcoder

Hi,

Thanks a lot!..I found this very useful..

Cheers!

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Saturday, February 14, 2009 8:54 PM by Nabyl

Thank you sooooo much, it worked perfectly. I added the following to my web.config

<runtime>

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

  <dependentAssembly>

    <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>

    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>

  </dependentAssembly>

  <dependentAssembly>

    <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>

    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>

  </dependentAssembly>

</assemblyBinding>

</runtime>

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Saturday, July 25, 2009 6:35 AM by mylene

Tnx... i owe u a lot... mwah!

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Sunday, August 30, 2009 8:31 AM by faares

i try all these solution but the problem still exists

the solutions i tried:

1- delete all your \bin files and rebuild the application

2-update my web.config

<runtime>

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

  <dependentAssembly>

    <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>

    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>

  </dependentAssembly>

  <dependentAssembly>

    <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>

    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>

  </dependentAssembly>

</assemblyBinding>

</runtime>

3-remove one of 1.0 and 3.5

C:\Windows\assembly.  

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Tuesday, September 22, 2009 3:30 AM by Anoop

reset the IIS it works sometimes

# Tardis Technologies

Saturday, October 03, 2009 10:19 PM by Tardis Technologies

Pingback from  Tardis Technologies

# Blog &raquo; Converting an application to .Net 3.5 and Visual Studio 2008 from .Net 2.0 and Visual Studio 2005

Pingback from  Blog &raquo; Converting an application to .Net 3.5 and Visual Studio 2008 from .Net 2.0 and Visual Studio 2005

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Tuesday, March 16, 2010 1:24 PM by Sinh Nguyen

Thank a lot. It solved my problem OK. Great post.

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Sunday, May 23, 2010 5:58 AM by prabodh

The following is the error , i am using asp.net 2005

-------------------------------------------------------

The server tag 'asp:ScriptManager' is ambiguous. Please modify the associated registration that is causing ambiguity and pick a new tag prefix.

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

Line 4:      Namespace="System.Web.UI" TagPrefix="asp" %>

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Sunday, May 23, 2010 7:55 AM by prabodh

Plz Reply at prabodh.bansal2@yahoo.com

Regards

Prabodh

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Wednesday, September 08, 2010 1:00 AM by Hoang

Oh my god@ very nice

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Thursday, October 07, 2010 8:46 AM by Ashwini

It just a GREAT POST.

Thanks A LOT :))

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Thursday, June 09, 2011 9:03 PM by Mohammad Salahuddin

Thanks a lot.This works nicely.

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Friday, July 08, 2011 10:41 AM by H

Good info... Thanks it's resolve my problem.

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Thursday, July 21, 2011 5:44 AM by Ankit

Comment this line in web config file

<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Monday, August 22, 2011 9:47 PM by Jacobo Cano

Thanks a lot!

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Monday, September 19, 2011 10:57 PM by viral.naik

Thank you so much Javier !!!

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Saturday, November 26, 2011 2:01 AM by navyjax2

This blog isn't the whole story.  You have to comment out v1.0.61025.0 of System.Web.Extensions and System.Web.Extensions.Design from your web.config.  Then you have to remove them using gacutil (in C:\Program Files\Visual Studio 8\SDK\bin folder, if you have VS 2005), or in C:\Windows\Microsoft.NET\Framework\v1.1* folder of that version's .NET Framework Redistributable.  You should use quotes around your removal command, like this:  gacutil -u "System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35".  If you have other things using it, I'd like to see others' responses on how to deal with that part...

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Saturday, November 26, 2011 2:53 AM by navyjax2

Actually I figured out how to remove references, though Microsoft's way of doing gacutil /u /r "System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" FILEPATH C:\WINDOWS\system32\msiexec.exe "Windows Installer" didn't work for me, when it was being held onto by Windows Installer.  Had to search for System.Web.Extensions in the registry.  Found 2 entries (one for the base, one for .Designs) at HKEY_CURRENT_USER\Software\Microsoft\Installer\Assemblies\Global and removed them.  Then I could get rid of the v1.0 DLLs.  Hope this helps someone.

# re: The type 'System.Web.UI.ScriptManager' is ambiguous: it could come from assembly...

Friday, January 20, 2012 5:32 AM by Harsh Damania HD

Hey i too had the same problem.I went to toolbox,right clicked to add items

in that i removed the references for updatepanel 3.5 and added 1.0

similary for script manager and other conttrols.

after this i added the following line of code on top of aspx page

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

   Namespace="System.Web.UI" TagPrefix="asp" %>

Leave a Comment

(required) 
(required) 
(optional)
(required)