Problem:

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">

posted on 2009-04-16 16:10  轻狂如我,奋华图强  阅读(1440)  评论(0)    收藏  举报