SharePoint And Ajax Technology(4):基於Microsoft ASP.NET AJAX 3.5的擴展2

6 .添加 < SafeControls > ,這裏一樣配置版本升級
      < SafeControl Assembly = "System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TypeName="*" Safe="True" />
7 .最後,在 < configuration > 標記內的底部(僅在 </ configuration > 以前),添加以下配置信息,對組件版本做了升級
  < system.web.extensions >
    < scripting >
      < webServices >
      </ webServices >
    </ scripting >
  </ system.web.extensions >
  < system.webServer >
    < validation validateIntegratedModeConfiguration = "false"/>
    < modules >
      < add name = "ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.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=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      < add name = "ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.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=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </ handlers >
  </ system.webServer >
  < system.webServer >
    < validation validateIntegratedModeConfiguration = "false"/>
    < modules >
      < remove name = "ScriptModule" />
      < add name = "ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </ modules >
    < handlers >
      < remove name = "WebServiceHandlerFactory-Integrated"/>
      < remove name = "ScriptHandlerFactory" />
      < remove name = "ScriptHandlerFactoryAppServices" />
      < remove name = "ScriptResource" />
      < add name = "ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      < add name = "ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.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=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </ handlers >
  </ system.webServer >
8 .最後若是之前開發的 AJAX 部件綁定仍是 1.0.61025.0 版本能夠添加以下配置信息來作版本兼容。
  < runtime >
    < assemblyBinding xmlns = "urn:schemas-microsoft-com:asm.v1">
      < dependentAssembly >
        < assemblyIdentity name = "System.Web.Extensions" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        < bindingRedirect oldVersion = "1.0.61025.0" newVersion="3.5.0.0" />
      </ dependentAssembly >
    </ assemblyBinding >
  </ runtime >
 
完成。
配製後刷新 MOSS 網站首頁,錯誤排除。
 
參考文章:
相關文章
相關標籤/搜索