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

Leave a Comment

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