Base class includes the field 'X', but its type (System.Web.UI.ScriptManager) is not compatible with the type of control (System.Web.UI.ScriptManager)

后端 未结 12 1276
渐次进展
渐次进展 2021-01-03 21:16

The full error is

The base class includes the field \'ScriptManager1\', but its type (System.Web.UI.ScriptManager) is not compatible with the type of

12条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-03 21:50

    Adding the section above fixed the problem on our dev machines and test server, but not our live servers.

    It turns out that if your web.config file contains an xmlns attribute of xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0" then you will get a GAC conflict:

    BAD.web.config
    
    
    etc
    

    but this version from the devt machine is fine:

    GOOD.web.config
    
    
    etc
    

    So make sure that 2.0 reference is removed from the top of your web.config file.

提交回复
热议问题