1<?xml version="1.0"?>
  2<!-- 
  3    Note: As an alternative to hand editing this file you can use the 
  4    web admin tool to configure settings for your application. Use
  5    the Website->Asp.Net Configuration option in Visual Studio.
  6    A full list of settings and comments can be found in 
  7    machine.config.comments usually located in 
  8    \Windows\Microsoft.Net\Framework\v2.x\Config 
  9-->
 10<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
 11    <configSections>  <!--声明配置块  -->
 12        <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"/>  <!--  日志配置块  -->
 13        <section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"/>  <!-- 异常配置块 -->
 14        <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"/> <!--  数据配置块  -->
 15        <section name="securityCryptographyConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Configuration.CryptographySettings, Microsoft.Practices.EnterpriseLibrary.Security.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"/>  <!--  安全配置块  -->
 16        <section name="StatsService" type="Commerce.Providers.StatsServiceSection, Commerce.StatsProvider" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>  <!--  状态服务配置块  -->
 17        <section name="TaxService" type="Commerce.Providers.TaxServiceSection, Commerce.TaxProvider" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>  <!--税务服务配置块-->
 18        <section name="ShippingService" type="Commerce.Providers.ShippingServiceSection, Commerce.ShippingProvider" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>  <!--运输服务配置块-->
 19        <section name="PaymentService" type="Commerce.Providers.PaymentServiceSection, Commerce.PaymentProvider" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>  <!--交费服务配置块-->
 20        <section name="ConfigurationService" type="Commerce.Providers.ConfigurationServiceSection, Commerce.ConfigurationProvider" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>  <!--配置服务配置块-->
 21        <section name="ContentProviderService" type="Commerce.Providers.ContentServiceSection, Commerce.ContentProvider" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>  <!--内容提供服务配置块-->
 22    </configSections>
<!--     日志配置块   -->
 23    <loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
 24        <listeners>
 25            <add source="Commerce Starter Kit" formatter="Text Formatter" log="Application" machineName="" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" name="Formatted EventLog TraceListener"/>
 26        </listeners>
 27        <formatters>  <!--  下面这段代码啥意思?不明白   -->
 28            <add template="Timestamp: {timestamp} Message: {message} Category: {category} Priority: {priority} EventId: {eventid} Severity: {severity} Title:{title} Machine: {machine} Application Domain: {appDomain} Process Id: {processId} Process Name: {processName} Win32 Thread Id: {win32ThreadId} Thread Name: {threadName} Extended Properties: {dictionary({key} - {value} )}" type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" name="Text Formatter"/>
 29        </formatters>
 30        <categorySources>
 31            <add switchValue="All" name="General">
 32                <listeners>
 33                    <add name="Formatted EventLog TraceListener"/>
 34                </listeners>
 35            </add>
 36        </categorySources>
 37        <specialSources>
 38            <allEvents switchValue="All" name="All Events"/>
 39            <notProcessed switchValue="All" name="Unprocessed Category"/>
 40            <errors switchValue="All" name="Logging Errors &amp; Warnings">
 41                <listeners>
 42                    <add name="Formatted EventLog TraceListener"/>
 43                </listeners>
 44            </errors>
 45        </specialSources>
 46    </loggingConfiguration
<!--  日志配置块完  -->
<!--  异常配置块开始 -->
 47    <exceptionHandling>
 48        <exceptionPolicies>
 49            <add name="Application Errors">
 50                <exceptionTypes>
 51                    <add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" postHandlingAction="NotifyRethrow" name="Exception">
 52                        <exceptionHandlers>
 53                            <add logCategory="General" eventId="100" severity="Error" title="Enterprise Library Exception Handling" formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" priority="0" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" name="Logging Handler"/>
 54                        </exceptionHandlers>
 55                    </add>
 56                </exceptionTypes>
 57            </add>
 58        </exceptionPolicies>
 59    </exceptionHandling>
<!--  异常处理块结束  -->
<!--  数据配置块开始  -->
 60    <dataConfiguration defaultDatabase="CommerceTemplate"/>
 61  
 62  <!--################################ Connection Strings ################################################-->
 63  <!--DONOTREMOVE-->
 64  <connectionStrings>
 65        <clear/>
 66    <!--This is the connection to your STORE-->
 67        <add name="CommerceTemplate" connectionString="STOREDATASOURCEUNSET" providerName="System.Data.SqlClient"/>
 68    <!--This is the connection to your Membership System-->
 69    <add name="LocalSqlServer" connectionString="MEMBERSHIPDATASOURCEUNSET" providerName="System.Data.SqlClient"/>
 70  </connectionStrings>
 71  <!--/DONOTREMOVE-->
 72  <!--####################################################################################################-->
<!--  数据配置块结束  -->

<!--  安全配置块开始  -->
 73 
 74    <securityCryptographyConfiguration>
 75        <hashProviders>
 76            <add algorithmType="System.Security.Cryptography.SHA1Managed, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" saltEnabled="true" type="Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.HashAlgorithmProvider, Microsoft.Practices.EnterpriseLibrary.Security.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" name="SHA1Managed"/>
 77        </hashProviders>
 78        <symmetricCryptoProviders>
 79            <add scope="CurrentUser" type="Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.DpapiSymmetricCryptoProvider, Microsoft.Practices.EnterpriseLibrary.Security.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" name="DPAPI Symmetric Cryptography Provider"/>
 80        </symmetricCryptoProviders>
 81    </securityCryptographyConfiguration>
<!--  安全配置块结束  -->

<!--  应用配置  -->
 82    <appSettings/>

<!--  内容服务配置块开始  -->
 83    <ContentProviderService defaultProvider="SqlContentProvider">
 84        <providers>
 85            <add name="SqlContentProvider" type="Commerce.Providers.SqlContentProvider, Commerce.ContentProvider" connectionStringName="CommerceTemplate"/>
 86        </providers>
 87    </ContentProviderService>
<!--  内容服务配置块结束  -->
 88
<!--  配置服务配置块开始  -->
 89    <ConfigurationService defaultProvider="SqlConfigurationProvider">
 90        <providers>
 91            <add name="SqlConfigurationProvider" type="Commerce.Providers.SqlConfigurationProvider, Commerce.ConfigurationProvider" connectionStringName="CommerceTemplate"/>
 92        </providers>
 93    </ConfigurationService>
<!--  配置服务配置块结束  -->

<!--  状态服务配置块开始  -->
 94    <StatsService defaultProvider="SqlStatsProvider">
 95        <providers>
 96            <add name="SqlStatsProvider" type="Commerce.Providers.SqlStatsProvider, Commerce.StatsProvider" connectionStringName="CommerceTemplate"/>
 97        </providers>
 98    </StatsService>
<!--  状态服务配置块结束  -->
 99  <!--
100    <TaxService defaultProvider="StrikeIronTaxProvider">
101        <providers>
102            <add name="StrikeIronTaxProvider" type="Commerce.Providers.StrikeIronTaxProvider, Commerce.TaxProvider" connectionStringName="CommerceTemplate"/>
103        </providers>
104    </TaxService>
105  -->

<!--  税务服务配置块开始  -->
106  <TaxService defaultProvider="SqlTaxProvider">
107    <providers>
108      <add name="SqlTaxProvider" type="Commerce.Providers.SqlTaxProvider, Commerce.TaxProvider" connectionStringName="CommerceTemplate"/>
109    </providers>
110  </TaxService>
<!--  税务服务配置块结束  -->

<!-- 运输服务配置块开始  -->
111    <ShippingService defaultProvider="SqlShippingProvider">
112        <providers>
113            <clear/>
114            <add name="SqlShippingProvider" 
115        type="Commerce.Providers.SqlShippingProvider, Commerce.ShippingProvider" 
116        connectionStringName="CommerceTemplate"/>
117      <add name="UpsShippingProvider" 
118        type="Commerce.Providers.UpsShippingProvider, Commerce.ShippingProvider" 
119        connectionUrl="https://wwwcie.ups.com/ups.app/xml/Rate" 
120        upsAccessKey="AccessKey" 
121        upsUserName="UserName" 
122        upsPassword="Password" 
123        upsAdditionalHandlingCharge="1.0" 
124        upsPickupTypeCode="01" 
125        upsCustomerClassification="04" 
126        upsPackagingTypeCode="02"/>
127      <add name="USPostalServiceShippingProvider" 
128        type="Commerce.Providers.USPostalServiceShippingProvider, Commerce.ShippingProvider" 
129        connectionUrl="http://production.shippingapis.com/ShippingAPI.dll" 
130        uspsUserName="Username" 
131        uspsPassword="Password" 
132        uspsAdditionalHandlingCharge="1.0"/>
133    </providers>
134    </ShippingService>
<!--  运输服务配置块结束  -->

<!--  交费服务配置块开始  -->
135    <PaymentService defaultProvider="PayPalPaymentProvider">
136        <providers>
137            <add name="PayPalPaymentProvider" 
138        type="Commerce.Providers.PayPalPaymentProvider, Commerce.PaymentProvider" 
139        serviceUserName="business_api1.csk.com" 
140        servicePassword="commerce" 
141        sslCertFile="csk.pfx" 
142        sslCertPassword="commerce" 
143        merchantID="csk@wekeroad.com"/>
144        </providers>
145    </PaymentService>
<!--  交费服务配置块结束  -->
146    <!--
147  <PaymentService defaultProvider="AuthorizeNetPaymentProvider">
148    <providers>
149      <clear />
150      <add name="AuthorizeNetPaymentProvider" type="Commerce.Providers.AuthorizeNetPaymentProvider, Commerce.PaymentProvider" 
151      serviceUserName="cnpdev1799" 
152      servicePassword="authnet101" 
153      transactionKey="COAd7pinhMc5Jgs9" 
154      currencyCode="USD" 
155      serverURL="https://test.authorize.net/gateway/transact.dll"
156      />
157    </providers>
158  </PaymentService>
159 -->
160    <system.web>
161        <httpModules>
162            <add name="MagicAjax" type="MagicAjax.MagicAjaxModule, MagicAjax"/>
163        </httpModules>
164        <!--
165    <globalization 
166    requestEncoding="utf-8"
167    responseEncoding="utf-8"
168    fileEncoding="utf-8"
169    culture="en-US"
170    uiCulture="en" />
171        <trust level="Medium" originUrl=".*"  />
172        -->
173        <roleManager enabled="true">
174            <providers>
175                <clear/>
176                <add name="AspNetSqlRoleProvider" 
177         connectionStringName="LocalSqlServer" 
178          applicationName="CSK" 
179          type="System.Web.Security.SqlRoleProvider"/>
180            </providers>
181        </roleManager>
182        <membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="15" hashAlgorithmType="">
183            <providers>
184                <clear/>
185                <add 
186          connectionStringName="LocalSqlServer" 
187          enablePasswordRetrieval="false" 
188          enablePasswordReset="true" 
189          requiresQuestionAndAnswer="true" 
190          applicationName="CSK" 
191          requiresUniqueEmail="false" 
192          passwordFormat="Hashed" 
193          maxInvalidPasswordAttempts="5" 
194          passwordAttemptWindow="10" 
195          passwordStrengthRegularExpression="" 
196          minRequiredPasswordLength="4" 
197          minRequiredNonalphanumericCharacters="0" 
198          name="AspNetSqlMembershipProvider" 
199          type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
200            </providers>
201        </membership>
202        <anonymousIdentification enabled="true"/>
203        <authentication mode="Forms">
204            <forms name=".ASPNET" loginUrl="login.aspx" protection="All" timeout="30" path="/"/>
205        </authentication>
206        <authorization>
207            <allow users="?"/>
208        </authorization>
209        <profile automaticSaveEnabled="true" defaultProvider="SqlProvider">
210            <providers>
211                <clear/>
212                <add name="SqlProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="CSK"/>
213            </providers>
214            <properties>
215        <add name="CurrentOrder" type="SiteOrder" allowAnonymous="true"/>
216        <add name="SavedCarts" type="Commerce.Common.OrderCollection" allowAnonymous="true"/>
217        <add name="FavoriteCategories" type="TrackedItemCollection" allowAnonymous="true" />
218        <add name="RecentlyViewedProducts" type="TrackedItemCollection" allowAnonymous="true" />
219        <add name="LastShippingAddress" type="Commerce.Common.Address" allowAnonymous="true"/>
220                <add name="LastBillingAddress" type="Commerce.Common.Address" allowAnonymous="true"/>
221        <add name="FullName" type="System.String"  allowAnonymous="true"/>
222            </properties>
223        </profile>
224        <!-- 
225            Set compilation debug="true" to insert debugging 
226            symbols into the compiled page. Because this 
227            affects performance, set this value to true only 
228            during development.
229        -->
230        <compilation debug="true">
231            <assemblies>
232                <add assembly="System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
233                <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
234                <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
235                <add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
236                <add assembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
237                <add assembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
238                <add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
239                <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
240                <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
241                <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
242                <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
243                <add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
244                <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
245
246    
247    </compilation>
248        <!--
249            The <authentication> section enables configuration 
250            of the security authentication mode used by 
251            ASP.NET to identify an incoming user. 
252        -->
253        <!--
254            The <customErrors> section enables configuration 
255            of what to do if/when an unhandled error occurs 
256            during the execution of a request. Specifically, 
257            it enables developers to configure html error pages 
258            to be displayed in place of a error stack trace.
259        -->
260        <customErrors mode="Off">
261        </customErrors>
262        <pages styleSheetTheme="Default" />
263    </system.web>
264    <system.net>
265        <mailSettings>
266            <smtp from="me@mystore.com">
267                <network host="localhost" password="" userName=""/>
268            </smtp>
269        </mailSettings>
270    </system.net>
271</configuration>
272
posted on 2006-07-04 10:37  I ... in .net  阅读(889)  评论(0编辑  收藏  举报