Configuration Services

Commerce Server 2002

Each .NET-based Commerce Server application contains a web.config file. To configure the Commerce Server .NET Application Framework, you modify the web.config file by changing the following sections:

  • The CommerceServer section configures the framework components.
  • The sectionGroups section lists the ASP.NET Configuration Section Handlers that should be used to read the data in the web.config file.
  • The httpModules section lists which HTTP modules and Commerce Modules should be enabled in the application.

For reference material pertaining to each of the tags in the web.config file, see .NET Configuration Settings.

Ee796798.note(en-US,CS.20).gif Notes

  • The order that modules are configured in web.config is significant; modules are initialized in the order in which they are listed.
  • If you create a new Commerce project by using the Project Creation Wizard, it automatically includes a default web.config file. Thus, projects created by the Project Creation Wizard do not need to modify the configSections element of the web.config file. For more information about the Project Creation Wizard, see Creating a Commerce Project.

The following is a sample excerpt from the web.config file:

    <configSections>
        <sectionGroup name="CommerceServer">
            <section name="application"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceApplicationSectionHandler, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
            <section name="authentication"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceAuthenticationSectionHandler, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
            <section name="pipelines"
type="Microsoft.CommerceServer.Runtime.Configuration.CommercePipelineSectionHandler, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
            <section name="caches"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceCacheSectionHandler, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
            <section name="messageManager"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceMessageManagerSectionHandler, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
            <section name="catalog"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceCatalogSectionHandler, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
            <section name="orders"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceOrdersSectionHandler, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
            <section name="profiles"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceProfilesSectionHandler, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
            <section name="contentSelection"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceContentSelectionSectionHandler, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
        </sectionGroup>
    </configSections>

    <CommerceServer>
        <application siteName="OrderSitelet" debugLevel="Checked"/>
        <authentication detectCookies="false"/>

        <pipelines>
            <pipeline
                name="basket"
                path="pipelines\basket.pcf"
                transacted="false"
                type="OrderPipeline"
                loggingEnabled="true"/>

            <pipeline
                name="checkout"
                path="pipelines\checkout.pcf"
                transacted="false"
                type="OrderPipeline"
                loggingEnabled="true"/>

            <pipeline
                name="product"
                path="pipelines\product.pcf"
                transacted="false"
                type="OrderPipeline"
                loggingEnabled="true"/>

            <pipeline
                name="total"
                path="pipelines\total.pcf"
                transacted="false"
                type="OrderPipeline"
                loggingEnabled="true"/>

        </pipelines>

        <caches>
            <cache
                name="Advertising"
                type="Advertising"
                refreshInterval="900"
                retryInterval="30"
                maxSize="10000"/>

            <cache
                name="Discounts"
                type="Discounts"
                refreshInterval="0"
                retryInterval="30"
                maxSize="10000"/>

            <cache
                name="SampleRegionalTaxCache"
                type="Tax"
                refreshInterval="0"
                retryInterval="30"
                maxSize="10000"/>

            <cache
                name="ShippingManagerCache"
                type="Shipping"
                loaderProgId="Commerce.ShippingManagerCache"
                refreshInterval="0"
                retryInterval="30"
                maxSize="10000"/>

            <cache
                name="QueryCatalogInfoCache"
                type="QCI"
                loaderProgId="Commerce.LRUCacheFlush"
                refreshInterval="0"
                retryInterval="300"
                maxSize="10000">

                <config key="TableName" value="CatalogCache_Virtual_Directory"/>

            </cache>
        </caches>

        <messageManager>
            <cultures default="en-US" baseName="OrderSitelet" assembly="OrderSitelet">
                <culture id="en-US"/>
                <culture id="fr-fr"/>
                <culture id="ja-JP"/>
            </cultures>
            <resources>
                <resource id="pur_badsku"/>
                <resource id="pur_badplacedprice"/>
                <resource id="pur_discount_changed"/>
                <resource id="pur_discount_removed"/>
                <resource id="pur_noitems"/>
                <resource id="pur_badshipping"/>
                <resource id="pur_badhandling"/>
                <resource id="pur_badtax"/>
                <resource id="pur_badcc"/>
                <resource id="pur_badpayment"/>
                <resource id="pur_badverify"/>
                <resource id="pur_out_of_stock"/>
                <resource id="unknown_shipping_method"/>
            </resources>
        </messageManager>

        <orders>
            <addressMap>
                <profileDefinition name="Address"/>
                <property from="GeneralInfo.address_id" to="address_id"/>
                <property from="GeneralInfo.address_id" to="shipping_address_id"/>
                <property from="GeneralInfo.first_name" to="first_name"/>
                <property from="GeneralInfo.last_name" to="last_name"/>
                <property from="GeneralInfo.address_line1" to="address_line1"/>
                <property from="GeneralInfo.address_line2" to="address_line2"/>
                <property from="GeneralInfo.city" to="city"/>
                <property from="GeneralInfo.region_name" to="region_code"/>
                <property from="GeneralInfo.postal_code" to="postal_code"/>
                <property from="GeneralInfo.country_name" to="ship_to_country"/>
                <property from="GeneralInfo.region_name" to="ship_to_state"/>
                <property from="GeneralInfo.country_name" to="country_code"/>
                <property from="GeneralInfo.tel_number" to="tel_number"/>
            </addressMap>
        </orders>

    <profiles>

        <encryption>
            <keys keyIndex="1">
                <add type="publicKey" value="<hex-string>" />
                <add type="privateKey1" value="<hex-string>" />
                <add type="privateKey2" value="<hex-string>" />
            </keys>
        </encryption>

        <userProfile
            profileDefinition="UserObject"
            userIdProperty="GeneralInfo.logon_name"
            organizationIdProperty="AccountInfo.org_id"
            catalogSetIdProperty="AccountInfo.user_catalog_set"
        />
        <organizationProfile
            profileDefintion="Organization"
            organizationIdProperty="GeneralInfo.org_id"
            catalogSetIdProperty="GeneralInfo.org_catalog_set"
        />
    </profiles>

    <contentSelection>
        <add name="advertising"
            cacheName="advertising"
            selectionPipeline="advertising"
            eventPipeline="recordEvent"
            preloadCache="true"
            redirectUrl="./redir.asp"
        />
        <add name="discounts"
            campaignsType="discounts"
            cacheName="discounts"
            selectionPipeline="discounts"
            eventPipeline="recordEvent"
            redirectUrl="./redir.asp"
        />
    </contentSelection >

    <catalog>
        <joinTable 
            joinType=”join-type-enum-value” 
            targetTableName=”target-table” 
            sourceJoinKey=”source-join-key” 
            targetJoinKey=”target-join-key” />

        <catalogSets
            defaultAuthenticated=”Registered Catalog Set”
            defaultAnonymouse=”Anonymous Catalog Set” />
    </catalog>

    </CommerceServer>

    <system.web>

        <httpModules>
            <add name="CommerceApplication"                type="Microsoft.CommerceServer.Runtime.CommerceApplicationModule, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
            <add name="CommerceAuthentication"                type="Microsoft.CommerceServer.Runtime.CommerceAuthenticationModule, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
            <add name="CommerceOrder"                type="Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
            <add name="CommerceCatalog"                type="Microsoft.CommerceServer.Runtime.Catalog.CommerceCatalogModule, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
            <add name="CommerceProfile"                type="Microsoft.CommerceServer.Runtime.Profiles.CommerceProfileModule, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
            <add name="CommerceExpressionEvaluator"                type="Microsoft.CommerceServer.Runtime.Targeting.CommerceExpressionModule, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
            <add name="CommerceCache"                type="Microsoft.CommerceServer.Runtime.Caching.CommerceCacheModule, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
            <add name="CommerceContentSelection"
                type="Microsoft.CommerceServer.Runtime.Targeting.CommerceContentSelectionModule, Microsoft.CommerceServer.Runtime, Version=4.5.1915.0, Culture=neutral, PublicKeyToken=fa6ab6564e139293" />
        </httpModules>
    </system.web>

See Also

.NET Class Reference

Commerce Modules

Copyright © 2005 Microsoft Corporation.
All rights reserved.
Show: