First of all, the original scenario is that the old project's Web solution is to use the old version of the. NET Framework 2.0,
So the machine has also installed Microsoft ASP.net 2.0 AJAX Extensions. Ajax plugin ...
But for a variety of reasons, it's about upgrading to the. NET Framework 3.5 version.
This causes the occurrence (the base class includes the field "ScriptManager1", but its type (System.Web.UI.ScriptManager) is incompatible with the type of the control (System.Web.UI.ScriptManager). )
The problem is that the AJAX version and your platform version do not meet the solution to this problem by simply modifying the original registered ASP tag version number for the 3.5 version as follows:
<%@ Register assembly= "System.Web.Extensions, version=1.0.61025.0,culture=neutral,publickeytoken= 31bf3856ad364e35 "namespace=" System.Web.UI "tagprefix=" ASP "%> after replacement
<%@ Register assembly= "System.Web.Extensions, version=3.5.0.0,culture=neutral,publickeytoken=31bf3856ad364e35" Namespace= "System.Web.UI" tagprefix= "ASP"%> may not be resolved after running. I was reporting another error (the server tag "Asp:scriptmanager" is ambiguous.) Please modify the association registration that causes this ambiguity and select a new tag prefix. )
My solution version is to open your Web.config file to change the version number of all the following XML code to version=3.5.0.0
<sectiongroup name= "system.web.extensions"
Type= "System.Web.Configuration.SystemWebExtensionsSectionGroup,
System.Web.Extensions, version=1.0.61025.0, Culture=neutral,
publickeytoken=31bf3856ad364e35 ">
<sectiongroup name= "scripting"
type= "System.Web.Configuration.ScriptingSectionGroup,
System.Web.Extensions, version=1.0.61025.0, Culture=neutral,
publickeytoken=31bf3856ad364e35 ">
<section name= "scriptResourceHandler"
type= "System.Web.Configuration.ScriptingScriptResourceHandlerSection,
System.Web.Extensions, version=1.0.61025.0, Culture=neutral,
publickeytoken=31bf3856ad364e35 "requirepermission= false"
allowdefinition= "MachineToApplication"/>
<sectiongroup name= "WebServices"
type= "System.Web.Configuration.ScriptingWebServicesSectionGroup,
System.Web.Extensions, version=1.0.61025.0, Culture=neutral,
publickeytoken=31bf3856ad364e35 ">
<section name= "jsonserialization"
type= "System.Web.Configuration.ScriptingJsonSerializationSection,
System.Web.Extensions, version=1.0.61025.0, Culture=neutral,
publickeytoken=31bf3856ad364e35 "requirepermission= false"
allowdefinition= "Everywhere"/>
<section name= "ProfileService"
type= "System.Web.Configuration.ScriptingProfileServiceSection,
System.Web.Extensions, version=1.0.61025.0, Culture=neutral,
publickeytoken=31bf3856ad364e35 "requirepermission= false"
allowdefinition= "MachineToApplication"/>
<section name= "AuthenticationService"
type= "System.Web.Configuration.ScriptingAuthenticationServiceSection,
System.Web.Extensions, version=1.0.61025.0, Culture=neutral,
Publickeytoken=31bf3856ad364e35 "requirepermission= false"
allowdefinition= "MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
Locate the <pages> node under <system.web>, and add the declarations for the following controls
<controls>
<add tagprefix= "asp" namespace= "System.Web.UI"
Assembly= "System.Web.Extensions, version=1.0.61025.0,
Culture=neutral, publickeytoken=31bf3856ad364e35 "/>
</controls> add a declaration to an assembly within the <assemblies> node
<add assembly= "System.Web.Extensions, version=1.0.61025.0,
Culture=neutral, publickeytoken=31bf3856ad364e35 "/> Find
<add verb= "*" path= "*.asmx" validate= "false"
Type= "System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, version=1.0.61025.0, Culture=neutral,
Publickeytoken=31bf3856ad364e35 "/>
<add verb= "*" path= "*_appservice.axd" validate= "false"
Type= "System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, version=1.0.61025.0, Culture=neutral,
Publickeytoken=31bf3856ad364e35 "/>
<add verb= "Get,head" path= "ScriptResource.axd"
Type= "System.Web.Handlers.ScriptResourceHandler,
System.Web.Extensions, version=1.0.61025.0, Culture=neutral,
Publickeytoken=31bf3856ad364e35 "validate= false"/>
Add the following script module handler within the
<add name= "Scriptmodule"
Type= "System.Web.Handlers.ScriptModule, System.Web.Extensions,
version=1.0.61025.0, Culture=neutral,
Publickeytoken=31bf3856ad364e35 "/> declared as a security control within the <SafeControls> node of the <SharePoint> element
<safecontrol assembly= "System.Web.Extensions,
version=1.0.61025.0, Culture=neutral,
Publickeytoken=31bf3856ad364e35 "namespace=" System.Web.UI "
Typename= "*" safe= "True"/> Find <configuration> node, add the following Web service handler
<system.web.extensions>
<scripting>
<webServices>
<!--uncomment this line to enable the authentication
service. Include requiressl= "true" if appropriate. -->
<!--
<authenticationservice enabled= "true"
requireSSL = "True|false"/>
-->
<!--Uncomment these lines to enable the Profile service.
to allow profiles properties to is retrieved and modified in
asp.net AJAX applications, you are need to add each property
name to the readaccessproperties and writeAccessProperties
attributes. -->
<!--
<profileservice enabled= "true"
readaccessproperties= "Propertyname1,propertyname2"
writeaccessproperties= "Propertyname1,propertyname2"/>
-->
</webServices>
<!--
<scriptresourcehandler enablecompression= "true"
enablecaching= "true"/>
-->
</scripting>
</system.web.extensions>
<system.webServer>
<validation validateintegratedmodeconfiguration= "false"/>
<modules>
<add name= "Scriptmodule" precondition= "Integratedmode"
type= "System.Web.Handlers.ScriptModule,
System.Web.Extensions, version=1.0.61025.0,
culture=neutral, publickeytoken=31bf3856ad364e35 "/>
</modules>
<handlers>
<remove name= "webservicehandlerfactory-integrated"/>
<add name= "scripthandlerfactory" verb= "*" path= "*.asmx"
precondition= "Integratedmode"
type= "System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, version=1.0.61025.0,
culture=neutral, publickeytoken=31bf3856ad364e35 "/>
<add name= "scripthandlerfactoryappservices" verb= "*"
Path= "*_appservice.axd" precondition= "Integratedmode"
type= "System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, version=1.0.61025.0,
culture=neutral, publickeytoken=31bf3856ad364e35 "/>
<add name= "ScriptResource" precondition= "Integratedmode"
verb= "Get,head" path= "ScriptResource.axd"
type= "System.Web.Handlers.ScriptResourceHandler,
System.Web.Extensions, version=1.0.61025.0,
culture=neutral, publickeytoken=31bf3856ad364e35 "/>
</handlers>
</system.webServer>