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:

    ASP.NET 'Atlas' installer

  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.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值