怎样安装ASP.NET 'Atlas'[翻译]

英文原文:http://atlas.asp.net/docs/Overview/install.aspx
怎样安装ASP.NET "Atlas"

介绍
本文主要介绍怎样在您的计算机上安装"Atlas"。主要包括以下三个部分:
  • 第一次安装"Atlas"。
  • 新建一个新的"Atlas"应用程序。
  • 在已有的ASP.NET 程序中添加"Atlas" 特性。

    第一次安装"Atlas"

    如果你到现在为止还没有安装,那么你必须下载建立"Atlas"应用程序所需的文件。您应该下载并运行一个 Windows installer (.msi) 的文件,它将会把所需要的文件安装到您的电脑上。

  • 一个名为Microsoft.Web.Atlas.dll的Atlas的程序集被安装到以下的目录下:

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

    这个程序集整合了整个了"Atlas"所需的客户端脚本库的脚本文件(.js文件)。

  • 为Visual Studio添加一个建立空白"Atlas"网站程序的网站模版(可选)。
  • Windows Communication Foundation (WCF)的组件。 WCF 是微软公司的一个建立软件服务的新平台。他被用在与现在 ASP.NET Web services (ASMX) 相同的情况, 也可以用在其它的情况上,你可以用其他的通讯技术,例如MSMQ, Remoting, or Enterprise Services。

    注意 Windows Communication Foundation现在还处于预览版。WCF将会成为Windows Vista操作系统的一部分一同发布,而且也作为WinFX Runtime Components的一部分支持Windows XP和Windows Server 2003。 "Atlas"的February 2006 Community Technology的WinFX预览版本将会被WCP支持. 想了解建立WCF并在"Atlas"使用它们的信息, 请看Using Windows Communication Foundation (WCF) with "Atlas"

    下载并安装ASP.NET 'Atlas' 包

    1. 在您的浏览器中,连接到'Atlas'的下载页面
    2. 点击下载连接下载并保存AtlasSetup.msi文件到您的计算机上。
    3. 在存放目录下运行AtlasSetup.msi文件。 安装向导将会运行:

      ASP.NET 'Atlas' installation wizard

    4. 点击Next并同意许可协议。
    5. 再点击Next。这一步问您是否愿意安装Visual Studio项目模版:

      'Atlas' installation: Choose whether to install the 'Atlas' Visual Studio project template

      如果您打算在Visual Studio创建ASP.NET "Atlas"网站程序,请确保Install Atlas Visual Studio Project Template复选框被选中。这个模版能让你通Visual Studio 过创建新的"Atlas"网站时在配置文件里设置好相关的"Atlas"组件的配置。

      注意  您必须安装Microsoft Visual Studio 2005或者Microsoft Visual Studio 2005 Express Edition才可以安装和使用此模版。

    6. 点击Next。向导讲题是您在IIS中注册.asbx文件扩展名:

      'Atlas' installation: Choose whether to register .asbx files with IIS

      .asbx扩展名的文件是标识为"Atlas"的bridge文件, 它是用于连接程序外部的Web services和您的应用服务的。bridge文件的其中一个功能是从其他的网站去数据并把它联立到您的应用程序,建立起"mash-ups(混搭型网站)"。如果你的应用程序是从外部的Web services取数据,那就推荐您注册一个.asbx文件。

       

    7. 点击Next,并点击Next开始安装:

      'Atlas' installation: Installation in progress

    8. 如果您选择了安装"Atlas" Visual Studio项目模版,安装向导将会出现以下选项(选择模版的语言类型):

      'Atlas' installation: in the Visual Studio Content Installer, select the template for the language (C# or Visual Basic) that you want

    9. 选择需要装在Visual Studio的语言版本相应的复选框,点击Next,然后点击Finish。
    10. 关闭Visual Studio Content安装程序,然后关闭"Atlas"安装程序。

      在Visual Studio创建一个ASP.NET "Atlas"项目

      安装完"Atlas"所需的文件以及"Atlas" Visual Studio项目模版以后,你可以通过Visual Studio 2005创建一个已经配置好"Atlas"特性的网站。

      创建一个新的"Atlas"网站:

      1. 运行Visual Studio。
      2. 文件菜单上, 单击新网站. (或者,点击新建,然后点击网站。)
      3. 我的模版, 选择ASP.NET 'Atlas Web Site
      4. 选择您项目的路径,选择您网站想要用的语言,输入或则浏览你要创建的网站的本地路径:

        ASP.NET 'Atlas' installer

      5. 点击确定.

      当你创建了一个新的"Atlas"网站后,Visual Studio会自动把"Atlas"运行时程序集从安装的目录夫知道网站目录的Bin文件夹中。Visual Studio也会自动生成一个已经把运行"Atlas"应用程序的设置配置好。

       

      为现有的ASP.NET应用程序添加"Atlas"特性

      您可以在现有的ASP.NET应用程序添加"Atlas"特性。

      在ASP.NET的应用程序上加入"Atlas"特性:

      1. 在Visual Studio打开ASP.NET应用程序。
      2. 从"Atlas"的安装目录下复制"Atlas"运行时程序集(Microsoft.Web.Atlas.dll)到应用程序的Bin目录。 默认情况下"Atlas"程序集被安装在以下路径:

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

      3. 在"Atlas"的默认路径打开Web.config文件。
      4. 复制"Atlas"所需的元素到您的应用程序的根目录下的Web.config文件里面。

        复制以下元素作为<configuration>元素的子元素:

                
        <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>

        复制以下元素作为 <system.web>元素的子元素:

                
        <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. 关闭文件。
  • posted on 2006-09-22 15:36  LJM  阅读(1727)  评论(5编辑  收藏  举报

    导航