Atlas基础-在Visual Studio.net中创建和添加Atlas特征

Creating an ASP.NET "Atlas" Project in Visual Studio

After installing the "Atlas" files and the "Atlas" Visual Studio project template, you can create a new Web site in Visual Studio 2005 that is configured with "Atlas" features.

To create a new "Atlas" Web site:

  1. Start Visual Studio.
  2. On the File menu, click New Web Site. (Alternatively, click New, and then click Web Site.)
  3. Under My Templates, select ASP.NET 'Atlas Web Site.
  4. Select the location for your installation, select the language you want to use for the Web site, and enter or browse to the local path where you want to create the Web site:

  5. Click OK.

When you create a new "Atlas" Web site, Visual Studio copies the "Atlas" run-time assembly from its installation location to the Web site's Bin folder. Visual Studio also generates a Web.config file that is preconfigured with settings required to run "Atlas" applications.

Adding "Atlas" Features to an Existing ASP.NET Application

You can add "Atlas" capabilities to your existing ASP.NET applications.

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.

你可能感兴趣的:(Web,.net,Microsoft,asp.net,asp)