国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網管 > 服務器 > 正文

服務器標記“asp:ScriptManager”不明確解決參考

2020-05-27 13:14:39
字體:
來源:轉載
供稿:網友

 首先說下原先的情況,就是原本老項目的Web解決方案是使用.net framework 2.0的老版本,

所以機器也安裝過Microsoft ASP.NET 2.0 AJAX Extensions..AJAX插件..

但是因為后面種種原因反正就是要升級到.net framework 3.5的版本。

因此導致出現 (基類包括字段“ScriptManager1”,但其類型(System.Web.UI.ScriptManager)與控件(System.Web.UI.ScriptManager)的類型不兼容。)

這個問題是 ajax 版本和你的平臺版本不符合 解決這個問題的辦法是 只要修改原來注冊的asp標記版本號換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" %> 運行后可能還未能解決。我當時報出另一個錯誤 (服務器標記“asp:ScriptManager”不明確。請修改導致此多義性的關聯注冊并選取新的標記前綴。)

這時 我的解決版本是打開你的web.config文件 將以下所有xml代碼的版本號更改為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>節點,添加下列控件的聲明

<controls>  <add tagPrefix="asp" namespace="System.Web.UI"    assembly="System.Web.Extensions, Version=1.0.61025.0,    Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></controls>在 <assemblies> 節點內添加對程序集的聲明

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

<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>節點內添加以下腳本模塊處理程序

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

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

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 涞水县| 博客| 新化县| 阳高县| 屯门区| 宣城市| 阿拉善左旗| 闽侯县| 曲靖市| 凌海市| 天祝| 吴江市| 栾川县| 威海市| 南郑县| 兰考县| 宁海县| 乐安县| 宁德市| 略阳县| 勐海县| 辽阳市| 巴南区| 江阴市| 清河县| 大足县| 班戈县| 池州市| 固镇县| 盐亭县| 嵩明县| 郓城县| 嘉鱼县| 青川县| 信宜市| 烟台市| 东兰县| 台东县| 长寿区| 景洪市| 沙雅县|