zoukankan      html  css  js  c++  java
  • Extending your MOSS site with ASP.NET AJAX 1.0

    Install ASP.NET Ajax 1.0

    Download and install ASP.NET Ajax from here. You need to install “ASP.NET AJAX Extensions 1.0”, which is the version built for ASP.NET 2.0

    Modify your web.config file

    After ASP.NET Ajax has been installed you need to modify the web.config file of your MOSS web site with a few Ajax specific entries. Typically, the web.config file is located in c:\inetpub\wwwroot\wss\virtualdirectories\80

    1. Add the following <sectionGroup> element in the <configSections> tag:
    代码
    1 <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    2 <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    3 <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
    4 <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    5 <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
    6 <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
    7 <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
    8 </sectionGroup>
    9 </sectionGroup>
    10  </sectionGroup>

    2. Add the following <controls> section as a child of the <system.web>/<pages> tag:

    1 <controls>
    2 <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    3  </controls>

    3. Add the following tag to the <assemblies> tag, within the <compilation> element:

    1 <add assembly="System.Web.Extensions, Version=1.0.61025.0,Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    4. Register the following HTTP handlers at the end of the  <httpHandlers> section:

    代码
    1 <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    2  <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"/>
    3  <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"/>

    5. Add the following HTTP module registration to the <httpModules> section beneath any existing modules:

    1 <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    6. Add a SafeControl entry for the System.Web.UI namespace from the System.Web.Extensions assembly within the <SharePoint>/<SafeControls> section:

    1 <SafeControl Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TypeName="*" Safe="True" />

    7. Finally, add the following configuration tags at the bottom of web.config, just before the end of the <configuration> tag:

    代码
    1 <system.web.extensions>
    2 <scripting>
    3 <webServices>
    4 <!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
    5 <!--
    6 <authenticationService enabled="true" requireSSL = "true|false"/>
    7 -->
    8 <!-- 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. -->
    9 <!--
    10 <profileService enabled="true"
    11 readAccessProperties="propertyname1,propertyname2"
    12 writeAccessProperties="propertyname1,propertyname2" />
    13 -->
    14 </webServices>
    15 <!--
    16 <scriptResourceHandler enableCompression="true" enableCaching="true" />
    17 -->
    18 </scripting>
    19 </system.web.extensions>
    20 <system.webServer>
    21 <validation validateIntegratedModeConfiguration="false"/>
    22 <modules>
    23 <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>d
    24 </modules>
    25 <handlers>
    26 <remove name="WebServiceHandlerFactory-Integrated" />
    27 <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
    28 type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    29 <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"/>
    30 <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" />
    31 </handlers>
    32  </system.webServer>
  • 相关阅读:
    配置JDK
    360首页(练习)
    表单练习——(简单的注册页面)
    主页
    证明某字母是否最后一个字母
    方法的重载与重写区别
    什么是设计模式
    java 静态方法和实例方法的区别
    什么是静态方法
    手机充电(练习)
  • 原文地址:https://www.cnblogs.com/johnsonwong/p/1766706.html
Copyright © 2011-2022 走看看