收录查询

Web.config内容中的结点

原文地址:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfnetframeworkconfigurationfileschema.asp

.NET Framework General Reference  

Configuration File Schema

Configuration Files are standard XML files. The .NET Framework defines a set of elements that implement configuration settings. This section describes the configuration schema for the machine configuration file, application configuration files, and the security configuration file.

You need to be familiar with XML if you want to directly edit the configuration files. XML tags and attributes are case-sensitive

In This Section

<configuration> Element
Describes the <configuration> element, which is the top-level element for all configuration files.
Startup Settings Schema
Describes the elements that specify which version of the common language runtime to use.
Runtime Settings Schema
Describes the elements that configure assembly binding and runtime behavior.
Remoting Settings Schema
Describes the elements that configure client and server applications that implement remoting.
Network Settings Schema
Describes the elements that specify how the .NET Framework connects to the Internet.
Cryptography Settings Schema
Describes elements that map friendly algorithm names to classes that implement cryptography algorithms.
Configuration Sections Schema
Describes the elements used to create and use configuration sections for custom settings.
Trace and Debug Settings Schema
Describes the elements that specify trace switches and listeners.
ASP.NET Settings Schema
Describes each of the configuration sections in the <system.web> section of Web.config files and shows the full syntax that each section supports.

Related Sections

Configuring Applications
Describes how to configure security, assembly binding, and remoting in the .NET Framework.
======================================================================

原文地址:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfconfiguration.asp

.NET Framework General Reference  

<configuration> Element

The root element in every configuration file used by the common language runtime and .NET Framework applications.

<configuration>

<configuration>
<!-- configuration settings -->
</configuration>

Child Elements

Element Description
Startup Settings Schema All elements in the startup settings schema.
Runtime Settings Schema All elements in the runtime settings schema.
Remoting Settings Schema All elements in the remoting settings schema.
Network Settings Schema All elements in the network settings schema.
Cryptography Settings Schema All elements in the crypto settings schema.
Configuration Sections Schema All elements in the configuration section settings schema.
Trace and Debug Settings Schema All elements in the trace and debug settings schema.
ASP.NET Settings Schema All elements in the ASP.NET configuration schema.

Remarks

Each configuration file must contain exactly one <configuration> element.

See Also

Configuration File Schema

=============================================================
如果安装好PETSHOP4之后,可以在 <Pet Shop 4 Install Folder>\Web\Web.config详细看下配置信息,如下:

  1<?xml version="1.0"?>
  2<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  3  <connectionStrings configProtectionProvider="RsaProtectedConfigurationProvider">
  4    <EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns="http://www.w3.org/2001/04/xmlenc#">
  5      <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
  6      <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
  7        <EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">
  8          <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
  9          <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
 10            <KeyName>Rsa Key</KeyName>
 11          </KeyInfo>
 12          <CipherData>
 13            <CipherValue>hxjvbchi2nlnIpxCo3s3RI7DdKCe/4gMYB5ZYeTAjqV01nUZ5V8Cnneb/lwYrW0Uvs8sMTM5EFVBAiXjDylLH3fuhSwcKYu7uVSyD6+uhGN5skreYPT7bUxN4nvmbrMJy3M0POCEmoUX0drCTdAcAl543CzoSCdnZIJvKIoRxzs=</CipherValue>
 14          </CipherData>
 15        </EncryptedKey>
 16      </KeyInfo>
 17      <CipherData>
 18        <CipherValue>sWZ4NfAllV/zYr40P/QQZli1yuyINCNoQS3F4T6P738VriYTZcVyOTNu+bp1HUlLW3byQiU3XTPAnnj5I6vIHjScnF9rdEWE9qBavymBOrNgZJD5Et90srIIr9LgUtC0N8i5/qQ5WUF7aPZLmPhZj3InExY9JGcRFiItiqQv0P8ATObtEWq3F7EO07P8n3wwAl5AfoRHpRTHw9nZ9/NqcmGmf9HozuiIOo8cNH6zxZRyv0kfxOnYfEFAEmiMQK0B7gZ3eOzLa0ci4kJ3CJpbMUM0JToE7PFx5i9dlBio0yAqBteoY49jr2iAAjVvnhdyqhOzor7i1SU+IGFqjGjkXyl0guVOUCMGzdBIHsJ4GiIjgas1Bh/hV3owzPkf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UdTHcCYE/q6q7D4CHfC3cVGEhM7Kk5kmBlqM5EjIDd98opXGOxzgqdXylAHj8frs8rlGAsPZ4B0q7cTNIDEN4eW0ksA6pESNVIZXSI1IvqpSTKTQRRWVwkYaztJj/gmOSoYQKD8+n98dE4ElRVHbPE/CtaHOo1R+jyZyuPOqmyGWKq97WeZVDXdJYHRT2ma5+uPAV48rYQajcoA/AIwAnUZJTpvRXV2qZvP5XZ6HCGMeewqkmtcFDBrf0cc/OxS3WW1583L+PEvFTKIq2WXlkG186ZSKFslJRwKYViDBMHJRISs/ihSE6tQK+3slaAZ+PMETx3zOVA9zLESEIgtb/wThcIFX+mlNCsWanQip/8NFB14WEa9UxicHvvismziSsHO4L4K+A/0NYgzZCaOD360+wZTwwdTgXHw5X4WgZ7z6SddGqzM5uLH25vdBrrqwnwFSDWSba8/7iCoQ1OHrYhtGGH6kzkYJFeY2N0bgUv+npc7/oN9couIqdc9PM5FSEoktwbJPIoGrpVXm1OC1yU/9utI74Z1fs4BAdHNUBvAXkJUhiBf1K32b20DtCx0qNqNA3aG6jHZY4TM2tkEzveKKFEjkwmP6J916KZq0vB31BM</CipherValue>
 19      </CipherData>
 20    </EncryptedData>
 21  </connectionStrings>
 22  <appSettings>
 23    <!-- Pet Shop DAL configuration settings. Possible values: PetShop.SQLServerDAL for SqlServer, PetShop.OracleServerDALfor Oracle. -->
 24    <add key="WebDAL" value="PetShop.SQLServerDAL"/>
 25    <add key="OrdersDAL" value="PetShop.SQLServerDAL"/>
 26    <add key="ProfileDAL" value="PetShop.SQLProfileDAL"/>
 27    <!-- Enable data caching -->
 28    <add key="EnableCaching" value="true"/>
 29    <!-- Cache duration (in hours-whole number only) -->
 30    <add key="CategoryCacheDuration" value="12"/>
 31    <add key="ProductCacheDuration" value="12"/>
 32    <add key="ItemCacheDuration" value="12"/>
 33    <!-- Cache dependency options. Possible values: PetShop.TableCacheDependency for SQL Server and keep empty for ORACLE -->
 34    <add key="CacheDependencyAssembly" value="PetShop.TableCacheDependency"/>
 35    <!-- CacheDatabaseName should match the name under caching section, when using TableCacheDependency -->
 36    <add key="CacheDatabaseName" value="MSPetShop4"/>
 37    <!-- *TableDependency lists table dependency for each instance separated by comma -->
 38    <add key="CategoryTableDependency" value="Category"/>
 39    <add key="ProductTableDependency" value="Product,Category"/>
 40    <add key="ItemTableDependency" value="Product,Category,Item"/>
 41    <!-- Order processing options (Asynch/Synch) -->
 42    <add key="OrderStrategyAssembly" value="PetShop.BLL"/>
 43    <add key="OrderStrategyClass" value="PetShop.BLL.OrderSynchronous"/>
 44    <!-- Asynchronous Order options -->
 45    <add key="OrderMessaging" value="PetShop.MSMQMessaging"/>
 46    <add key="OrderQueuePath" value="FormatName:DIRECT=OS:MachineName\Private$\PSOrders"/>
 47    <!-- Application Error Log -->
 48    <add key="Event Log Source" value=".NET Pet Shop 4.0"/>
 49  </appSettings>
 50  <system.web>
 51    <pages theme="PetShop" styleSheetTheme="PetShop"/>
 52    <!-- 
 53            Set compilation debug="true" to insert debugging 
 54            symbols into the compiled page. Because this 
 55            affects performance, set this value to true only 
 56            during development.
 57        -->
 58    <compilation debug="true">
 59      <assemblies>
 60        <add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
 61        <add assembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
 62        <add assembly="Accessibility, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
 63        <add assembly="System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
 64      </assemblies>
 65    </compilation>
 66    <!--
 67            The <authentication> section enables configuration 
 68            of the security authentication mode used by 
 69            ASP.NET to identify an incoming user. 
 70         -->
 71    <authentication mode="Forms">
 72      <forms name="PetShopAuth" loginUrl="SignIn.aspx" protection="None" timeout="60"/>
 73    </authentication>
 74    <!--
 75            The <customErrors> section enables configuration 
 76            of what to do if/when an unhandled error occurs 
 77            during the execution of a request. Specifically, 
 78            it enables developers to configure html error pages 
 79            to be displayed in place of a error stack trace.
 80        -->
 81    <customErrors defaultRedirect="Error.aspx" mode="RemoteOnly"/>
 82    <sessionState mode="Off"/>
 83    <anonymousIdentification enabled="true"/>
 84    <profile automaticSaveEnabled="false" defaultProvider="ShoppingCartProvider">
 85      <providers>
 86        <add name="ShoppingCartProvider" connectionStringName="SQLProfileConnString" type="PetShop.Profile.PetShopProfileProvider" applicationName=".NET Pet Shop 4.0"/>
 87        <add name="WishListProvider" connectionStringName="SQLProfileConnString" type="PetShop.Profile.PetShopProfileProvider" applicationName=".NET Pet Shop 4.0"/>
 88        <add name="AccountInfoProvider" connectionStringName="SQLProfileConnString" type="PetShop.Profile.PetShopProfileProvider" applicationName=".NET Pet Shop 4.0"/>
 89      </providers>
 90      <properties>
 91        <add name="ShoppingCart" type="PetShop.BLL.Cart" allowAnonymous="true" provider="ShoppingCartProvider"/>
 92        <add name="WishList" type="PetShop.BLL.Cart" allowAnonymous="true" provider="WishListProvider"/>
 93        <add name="AccountInfo" type="PetShop.Model.AddressInfo" allowAnonymous="false" provider="AccountInfoProvider"/>
 94      </properties>
 95    </profile>
 96    <!-- Membership Provider for SqlServer -->
 97    <membership defaultProvider="SQLMembershipProvider">
 98      <providers>
 99        <add name="SQLMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SQLMembershipConnString" applicationName=".NET Pet Shop 4.0" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed"/>
100      </providers>
101    </membership>
102    <!-- Membership Provider for Oracle -->
103    <!-- 
104        <membership defaultProvider="OracleMembershipProvider">
105            <providers>
106                <clear/>
107                <add name="OracleMembershipProvider" 
108                    type="PetShop.Membership.OracleMembershipProvider" 
109                    connectionStringName="OraMembershipConnString" 
110                    enablePasswordRetrieval="false" 
111                    enablePasswordReset="false" 
112                    requiresUniqueEmail="false" 
113                    requiresQuestionAndAnswer="false" 
114                    minRequiredPasswordLength="7" 
115                    minRequiredNonalphanumericCharacters="1" 
116                    applicationName=".NET Pet Shop 4.0" 
117                    hashAlgorithmType="SHA1" 
118                    passwordFormat="Hashed"/>
119            </providers>
120        </membership>
121         -->
122    <caching>
123      <sqlCacheDependency enabled="true" pollTime="10000">
124        <databases>
125          <add name="MSPetShop4" connectionStringName="SQLConnString1" pollTime="10000"/>
126        </databases>
127      </sqlCacheDependency>
128    </caching>
129  </system.web>
130  <location path="UserProfile.aspx">
131    <system.web>
132      <authorization>
133        <deny users="?"/>
134      </authorization>
135    </system.web>
136  </location>
137  <location path="CheckOut.aspx">
138    <system.web>
139      <authorization>
140        <deny users="?"/>
141      </authorization>
142    </system.web>
143  </location>
144</configuration>
145
posted @ 2006-09-28 15:37  ->  阅读(734)  评论(0)    收藏  举报