麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁(yè) > 網(wǎng)管 > 服務(wù)器 > 正文

服務(wù)器標(biāo)記“asp:ScriptManager”不明確解決參考

2020-05-27 13:14:39
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

 首先說(shuō)下原先的情況,就是原本老項(xiàng)目的Web解決方案是使用.net framework 2.0的老版本,

所以機(jī)器也安裝過(guò)Microsoft ASP.NET 2.0 AJAX Extensions..AJAX插件..

但是因?yàn)楹竺娣N種原因反正就是要升級(jí)到.net framework 3.5的版本。

因此導(dǎo)致出現(xiàn) (基類(lèi)包括字段“ScriptManager1”,但其類(lèi)型(System.Web.UI.ScriptManager)與控件(System.Web.UI.ScriptManager)的類(lèi)型不兼容。)

這個(gè)問(wèn)題是 ajax 版本和你的平臺(tái)版本不符合 解決這個(gè)問(wèn)題的辦法是 只要修改原來(lái)注冊(cè)的asp標(biāo)記版本號(hào)換3.5的版本如下:

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31BF3856AD364E35" Namespace="System.Web.UI" TagPrefix="asp" %>更換后

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0,Culture=neutral,PublicKeyToken=31BF3856AD364E35" Namespace="System.Web.UI" TagPrefix="asp" %> 運(yùn)行后可能還未能解決。我當(dāng)時(shí)報(bào)出另一個(gè)錯(cuò)誤 (服務(wù)器標(biāo)記“asp:ScriptManager”不明確。請(qǐng)修改導(dǎo)致此多義性的關(guān)聯(lián)注冊(cè)并選取新的標(biāo)記前綴。)

這時(shí) 我的解決版本是打開(kāi)你的web.config文件 將以下所有xml代碼的版本號(hào)更改為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>

找到<system.web>下的<pages>節(jié)點(diǎn),添加下列控件的聲明

<controls>  <add tagPrefix="asp" namespace="System.Web.UI"    assembly="System.Web.Extensions, Version=1.0.61025.0,    Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></controls>在 <assemblies> 節(jié)點(diǎn)內(nèi)添加對(duì)程序集的聲明

<add assembly="System.Web.Extensions, Version=1.0.61025.0,  Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>找到 <httpHandlers> 節(jié)點(diǎn),往里面添加以下謂詞處理程序

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

在<httpModules>節(jié)點(diǎn)內(nèi)添加以下腳本模塊處理程序

<add name="ScriptModule"  type="System.Web.Handlers.ScriptModule, System.Web.Extensions,  Version=1.0.61025.0, Culture=neutral,  PublicKeyToken=31bf3856ad364e35"/>在<SharePoint> 元素中的 <SafeControls> 節(jié)點(diǎn)內(nèi)聲明為安全控件

<SafeControl Assembly="System.Web.Extensions,  Version=1.0.61025.0, Culture=neutral,  PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI"  TypeName="*" Safe="True" />找到<configuration> 節(jié)點(diǎn),添加以下Web 服務(wù)處理程序

<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 profile properties to be retrieved and modified in      ASP.NET AJAX applications, you 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>

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 欧美福利视频一区二区 | 欧美精品一区二区三区在线 | 91精选视频 | 国产精品视频二区不卡 | 99视频网址 | www.99tv| 国产精品久久久久久久久久久久午夜 | 国产免费让你躁在线视频 | 欧美乱淫 | 日本娇小videos高潮 | 欧美69free性videos | 国外成人在线视频 | 天天透天天狠天天爱综合97 | 国产精品视频亚洲 | 久久精品1区2区 | 色网免费观看 | 黄色大片免费网站 | 成人国产视频在线观看 | 性爱网站| 黄色网址免费进入 | 黄wwww| 日韩黄色免费电影 | 毛片网站视频 | 国产女同疯狂激烈互摸 | 精品国产一区二区三区四区阿崩 | 99sesese| 欧美 日韩 亚洲 中文 | 黄色特级毛片 | 欧美亚洲另类在线 | 九九热视频这里只有精品 | 中文字幕在线观看免费视频 | 毛片电影网址 | 精品伊人 | 成人三级视频在线观看 | 羞羞视频.www在线观看 | 日韩视频一区二区三区在线观看 | 男女羞羞的视频 | 亚洲综合视频一区 | 亚洲欧美日韩免费 | 欧美a∨亚洲欧美亚洲 | 热99在线视频|