atlas网站的webconfig配置文件

使用Atlas Hands-On-Lab VSI模板时,您可能不见得会注意到在项目角落中有一个隐形人,它就是Web.config配置文件,与一般的项目配置文件不同它里面加入了Atlas运作所必须的相关设定,以下是其组态设定:

 

<?xml version="1.0"?>

<!--

    Note: As an alternative to hand editing this file you can use the

    web admin tool to configure settings for your application. Use

    the Website->Asp.Net Configuration option in Visual Studio.

    A full list of settings and comments can be found in

    machine.config.comments usually located in

    /Windows/Microsoft.Net/Framework/v2.x/Config

-->

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

    <!--

        The configSections define a section for ASP.NET Atlas

    -->

    <configSections>

        <sectionGroup name="microsoft.web"

         type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup">

            <section name="scripts"

             type="Microsoft.Web.Configuration.ScriptsSection"/>

            <section name="converters"

             type="Microsoft.Web.Configuration.ConvertersSection"/>

        </sectionGroup>

    </configSections>

 

    <!--

        atlas.web section defines the script files required for the Atlas

        framework when used in the client

    -->

    <microsoft.web>

        <scripts scriptLibraryPath="~/ScriptLibrary/">

        </scripts>

        <converters>

            <add type="Microsoft.Web.Services.Converters.DateTimeConverter"/>

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

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

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

        </converters>

    </microsoft.web>

    <appSettings/>

    <connectionStrings/>

    <system.web>

      <pages>

          <controls>

              <add namespace="Microsoft.Web" assembly="Microsoft.Web.Atlas"

               tagPrefix="atlas"/>

              <add namespace="Microsoft.Web.Components"

               assembly="Microsoft.Web.Atlas" tagPrefix="atlas"/>

              <add namespace="Microsoft.Web.UI"

               assembly="Microsoft.Web.Atlas" tagPrefix="atlas"/>

          </controls>

      </pages>

       <!--

            Set compilation debug="true" to insert debugging

            symbols into the compiled page. Because this

            affects performance, set this value to true only

            during development.

        -->

        <compilation debug="false">

          <buildProviders>

              <add extension=".script"

               type="Microsoft.Web.Compilation.ScriptBuildProvider" />

          </buildProviders>

        </compilation>

 

        <!--

            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>

        <!--

            The <authentication> section enables configuration

            of the security authentication mode used by

            ASP.NET to identify an incoming user.

        -->

        <authentication mode="Windows"/>

        <!--

        -->

    </system.web>

</configuration>

因为以上的Atlas设定,所以网站一开始就必须以Atlas网站型式建立才能使用Atlas控件,否则在普通的ASP.NET网站即便可以拖曳Atlas控件,但因缺乏相关的Atlas Script Library及设定,Atlas网页亦无法执行。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值