2007年3月6日 星期二

To add "Atlas" features to an ASP.NET application:

1.  Open the ASP.NET application in Visual Studio.

2.  Copy the "Atlas" run-time assembly (Microsoft.Web.Atlas.dll) from its installation folder to the application's Bin folder. By default, the "Atlas" assembly is installed in this location:

C:\Program Files\Microsoft ASP.NET\Atlas\v2.0.50727\Atlas

3.  Open the Web.config file in the "Atlas" default location.

4.  Copy elements required for "Atlas" to the Web.config file in your application's root folder.

Copy these elements as children of the <configuration> element:

  <configSections>

    <sectionGroup name="microsoft.web" type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup">

      <section name="converters" type="Microsoft.Web.Configuration.ConvertersSection"/>

    </sectionGroup>

  </configSections>

 

  <microsoft.web>

    <converters>

      <add type="Microsoft.Web.Script.Serialization.Converters.DataSetConverter"/>

      <add type="Microsoft.Web.Script.Serialization.Converters.DataRowConverter"/>

      <add type="Microsoft.Web.Script.Serialization.Converters.DataTableConverter"/>

    </converters>

  </microsoft.web>

Copy (or integrate) these elements as children of the <system.web> element:

    <pages>

      <controls>

        <add namespace="Microsoft.Web.UI" assembly="Microsoft.Web.Atlas" tagPrefix="atlas"/>

        <add namespace="Microsoft.Web.UI.Controls" assembly="Microsoft.Web.Atlas" tagPrefix="atlas"/>

      </controls>

    </pages>

 

    <!-- ASMX is mapped to a new handler so that proxy javascripts can also be served. -->

    <httpHandlers>

      <remove verb="*" path="*.asmx"/>

      <add verb="*" path="*.asmx" type="Microsoft.Web.Services.ScriptHandlerFactory" validate="false"/>

    </httpHandlers>

    <httpModules>

      <add name="ScriptModule" type="Microsoft.Web.Services.ScriptModule"/>

    </httpModules>

5.  Close all files.

 

沒有留言:

Share with Facebook