Server Tag "Asp:scriptmanager" Ambiguous resolution reference

Source: Internet
Author: User

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

&lt;sectiongroup name= "system.web.extensions"


Type= "System.Web.Configuration.SystemWebExtensionsSectionGroup,


System.Web.Extensions, version=1.0.61025.0, Culture=neutral,


publickeytoken=31bf3856ad364e35 "&gt;


&lt;sectiongroup name= "scripting"


type= "System.Web.Configuration.ScriptingSectionGroup,


System.Web.Extensions, version=1.0.61025.0, Culture=neutral,


publickeytoken=31bf3856ad364e35 "&gt;


&lt;section name= "scriptResourceHandler"


type= "System.Web.Configuration.ScriptingScriptResourceHandlerSection,


System.Web.Extensions, version=1.0.61025.0, Culture=neutral,


publickeytoken=31bf3856ad364e35 "requirepermission= false"


allowdefinition= "MachineToApplication"/&gt;


&lt;sectiongroup name= "WebServices"


type= "System.Web.Configuration.ScriptingWebServicesSectionGroup,


System.Web.Extensions, version=1.0.61025.0, Culture=neutral,


publickeytoken=31bf3856ad364e35 "&gt;


&lt;section name= "jsonserialization"


type= "System.Web.Configuration.ScriptingJsonSerializationSection,


System.Web.Extensions, version=1.0.61025.0, Culture=neutral,


publickeytoken=31bf3856ad364e35 "requirepermission= false"


allowdefinition= "Everywhere"/&gt;


&lt;section name= "ProfileService"


type= "System.Web.Configuration.ScriptingProfileServiceSection,


System.Web.Extensions, version=1.0.61025.0, Culture=neutral,


publickeytoken=31bf3856ad364e35 "requirepermission= false"


allowdefinition= "MachineToApplication"/&gt;


&lt;section name= "AuthenticationService"


type= "System.Web.Configuration.ScriptingAuthenticationServiceSection,


System.Web.Extensions, version=1.0.61025.0, Culture=neutral,


Publickeytoken=31bf3856ad364e35 "requirepermission= false"


allowdefinition= "MachineToApplication"/&gt;


&lt;/sectionGroup&gt;


&lt;/sectionGroup&gt;


&lt;/sectionGroup&gt;

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

&lt;system.web.extensions&gt;


&lt;scripting&gt;


&lt;webServices&gt;


&lt;!--uncomment this line to enable the authentication


service. Include requiressl= "true" if appropriate. --&gt;


&lt;!--


&lt;authenticationservice enabled= "true"


requireSSL = "True|false"/&gt;


--&gt;


&lt;!--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. --&gt;


&lt;!--


&lt;profileservice enabled= "true"


readaccessproperties= "Propertyname1,propertyname2"


writeaccessproperties= "Propertyname1,propertyname2"/&gt;


--&gt;


&lt;/webServices&gt;


&lt;!--


&lt;scriptresourcehandler enablecompression= "true"


enablecaching= "true"/&gt;


--&gt;


&lt;/scripting&gt;


&lt;/system.web.extensions&gt;


&lt;system.webServer&gt;


&lt;validation validateintegratedmodeconfiguration= "false"/&gt;


&lt;modules&gt;


&lt;add name= "Scriptmodule" precondition= "Integratedmode"


type= "System.Web.Handlers.ScriptModule,


System.Web.Extensions, version=1.0.61025.0,


culture=neutral, publickeytoken=31bf3856ad364e35 "/&gt;


&lt;/modules&gt;


&lt;handlers&gt;


&lt;remove name= "webservicehandlerfactory-integrated"/&gt;


&lt;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 "/&gt;


&lt;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 "/&gt;


&lt;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 "/&gt;


&lt;/handlers&gt;


&lt;/system.webServer&gt;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.