Encounter error message,
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 may encounter this problem after migrating your application to other host.
========
Solution:
My solution is
1.Delete all files in your bin folder. You may want to backup all of them first.
2.Remove the reference of System.Web.Extensions and System.Web.Extensions.Design from your project(application). They should be version 1.0.61025.0.
3.Re-add System.Web.Extensions and System.Web.Extensions.Design into your project(application). Be sure to include the new version, 3.5.0.0.
4.Modify these two line in your Web.config.
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> |
change the version attribute
<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"> |
There are two solutions I refered.
http://weblogs.asp.net/javiervillarreal/archive/2008/01/30/the-type-system-web-ui-scriptmanager-is-ambiguous-it-could-come-from-assembly.aspx
and
http://www.eggheadcafe.com/aspnet/how-to/1858840/the-type-systemwebuis.aspx
沒有留言:
張貼留言