Commerce Server General - Prolem while Running Pipeline (please find the code below)

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > February 2006 > Prolem while Running Pipeline (please find the code below)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Prolem while Running Pipeline (please find the code below)
bharath

2006-02-02, 7:57 am

we have some problem while accessing basket pipeline. here we are
giving code. can any one give some solution for this problem.
please give simple code for running pipeline.


Error Displayed:
------------------------------------------------

Component Execution failed for component[0x8] hr: 0x80004005 ProgID:
Commerce.OrderDiscount.1 Dictionary error: Value for key 'CacheName' in
dictionary 'context' missing (expected a variant of type 8)
(orderform=default)

----------------------------------------------------------------

Code listing for Basket.aspx.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Microsoft.CommerceServer.Runtime;
using Microsoft.CommerceServer.Runtime.Profiles;
using Microsoft.CommerceServer.Runtime.Orders;
using Microsoft.CommerceServer.Runtime.Pipelines;
using Microsoft.CommerceServer.Runtime.Catalog;
using Microsoft.CommerceServer.Runtime.Diagnostics;
using Microsoft.CommerceServer.Runtime.Caching;


namespace oshoCommerce
{
/// <summary>
/// Summary description for Basket.
/// </summary>
public class Basket : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Status;
protected System.Web.UI.WebControls.Button AddBtn;
protected System.Web.UI.WebControls.Repeater BasketListing;
protected System.Web.UI.WebControls.Label SubTotal;
protected System.Web.UI.WebControls.Label Tax;
protected System.Web.UI.WebControls.Label Total;


//OrderContext ordersys= CommerceContext.Current.OrderSystem;
Microsoft.CommerceServer.Runtime.Orders.Basket shoppingCart = null;
private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack) {
UpdateBasket();
}

}
void UpdateBasket()
{

LineItem item = new LineItem();
item.ProductCatalog = "Osho Commerce";
item.ProductID = Request.QueryString ["ProductID"];
item.Quantity = Convert.ToInt32(Request.QueryString ["Quantity"]);
OrderContext orders = CommerceContext.Current.OrderSystem;
OrderForm of = null;


// This requires that the CommerceContext.UserID property already
// be set. It can either be set dynamically if using Commerce
Server
// authentication, or manually.
shoppingCart = orders.GetBasket(new
System.Guid(CommerceContext.Current.UserID));

// If the shopping cart has just been created, no order forms
// will exist and thus, it is unusable. So a new, default
// order form must be added.
if (shoppingCart.OrderForms.Count == 0)
{
shoppingCart.OrderForms.Add(new OrderForm("default"));

}

shoppingCart.OrderForms["default"].LineItems. Add(item);


// Execute the product pipeline to ensure we have the latest product
// information in the basket.
shoppingCart.RunPipeline(new PipelineInfo("BasketPipeline"));

// Bind the default order form to the Repeater control used for
// displaying its contents.



BasketListing.DataSource =
shoppingCart.OrderForms["default"].LineItems;
BasketListing.DataBind();

// Update information about the order.
SubTotal.Text = String.Format("{0:C}", shoppingCart.SubTotal);

// This data will not be available after running the basket pipeline
// alone.
Tax.Text = String.Format("{0:C}", shoppingCart.TaxTotal);
Total.Text = String.Format("{0:C}", shoppingCart.Total);

shoppingCart.Save();

}

public void AddBtn_Click(object source, EventArgs args)
{

OrderContext orders = CommerceContext.Current.OrderSystem;

// Create and populate an instance of the LineItem class
// that will be added to the order. If a product variation
// was being added, the VariantID would need to be specified
// for the LineItem instance.
LineItem item = new LineItem();
item.ProductCatalog = "Osho Commerce";
item.ProductID = Request.QueryString ["ProductID"];

item.Quantity = Convert.ToInt32(Request.QueryString ["Quantity"]);

try
{

// This requires that the CommerceContext.UserID property already
// be set. It can either be set dynamically if using Commerce
Server
// authentication, or manually.
shoppingCart = orders.GetBasket(new
System.Guid(CommerceContext.Current.UserID));

// Try to add the new line item. If it fails, we will
// present the user with a friendly error message.
shoppingCart.OrderForms["default"].LineItems.Add(item);

// Execute the product pipeline to ensure we have the latest
product
// information in the basket.
shoppingCart.RunPipeline(new PipelineInfo("BasketPipeline"));

shoppingCart.Save();

}
catch (Exception exc)
{

Status.Text = "Basket unavailable.";
BasketListing.Visible = false;
AddBtn.Visible = false;
return;
}

UpdateBasket();
}


#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion
}
}


-------------------------------------------

web.config settings
----------------------------


<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- COMMERCE SERVER CONFIGURATION SECTION HANDLERS
These configuration sections are required for the Commerce
Server .NET Application
Framework to function properly. They must be registered
using the strong name for the
assemblies.
-->
<sectionGroup name="CommerceServer">
<section name="application"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceApplicationSectionHandler,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<section name="authentication"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceAuthenticationSectionHandler,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<section name="pipelines"
type="Microsoft.CommerceServer.Runtime.Configuration.CommercePipelineSectionHandler,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<section name="caches"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceCacheSectionHandler,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<section name="messageManager"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceMessageManagerSectionHandler,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<section name="catalog"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceCatalogSectionHandler,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<section name="orders"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceOrdersSectionHandler,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<section name="profiles"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceProfilesSectionHandler,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<section name="contentSelection"
type="Microsoft.CommerceServer.Runtime.Configuration.CommerceContentSelectionSectionHandler,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<section name="commerceEvent"
type="Microsoft.CommerceServer.Runtime.Configuration.EventLoggerConfigurationHandler,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
</sectionGroup>
</configSections>
<!-- COMMERCE SERVER CONFIGURATION SECTION
This signifies the beginning of the configuration of the
Commerce Server .NET
Application Framework.
-->
<CommerceServer>
<contentSelection>
<add name="discounts" cacheName="discounts"
selectionPipeline="discounts" eventPipeline="recordEvent"
redirectUrl="./redir.aspx"/>
</contentSelection>
<!-- APPLICATION
Set the siteName to be the name of the site as it has been
registered in the Administration
database. The Site Packager will update this attribute
automatically when unpacking
a site. Set debugLevel to "Checked", "Debug", or
"Production". Because the "Checked" and
"Debug" settings cause the application to run slower than
normal, you should only use these
values when debugging the application.
-->
<application siteName="oshoCommerce" debugLevel="Checked"/>
<!-- AUTHENTICATION
Set the ticketTimeOut to the appropriate timeout value for
authentication tickets issued
for the application. Set detectCookies to true if you wish
to enable a cookie to URL-mode
fallback authentication scheme.<A
HREF="http://essserver/oshoCommerce/Web.config">http://essserver/oshoCommerce/Web.config</A>
-->
<authentication ticketTimeOut="30" detectCookies="true"/>
<!-- PIPELINES
Configure the pipelines you wish to use in your
application.
-->
<pipelines>
<!--PIPELINE CONFIGURATION
Set the name of the pipeline to whatever string you wish to
use when referencing the
pipeline in your application. The path should be set to a
the relative path of the pipeline
configuration file (.PCF) that corresponds to the pipeline
you wish to execute when
referencing the pipeline in your application. Set
transacted to false to disable COM+
Transactions when executing your pipeline. The type should
be set to either "OrderPipeline"
or "CSFPipeline" depending on if you intend to use the
pipeline for processing Orders or
displaying advertisements. Set loggingEnabled to true to
enable pipeline logging. The log
will be created in the "pipelines\log" directory of your
application. Note that this
causes the application to run slower than normal so it
should only be enabled during
debugging.

Sample pipeline configuration sections have been provided
below.
-->
<!-- BEGIN SAMPLE PIPELINE CONFIGURATION SECTIONS-->
<pipeline
name="BasketPipeline"
path="Pipelines\BasketPipeline.pcf"
transacted="false"
type="OrderPipeline"
loggingEnabled="true" />
<pipeline
name="discounts"
path="pipelines\discounts.pcf"
transacted="false"
type="CSFPipeline" />
<!--pipeline
name="ProductPipeline"
path="Pipelines\ProductPipeline.pcf"
transacted="false"
type="OrderPipeline"
loggingEnabled="true" />

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

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

<pipeline
name="advertising"
path="pipelines\advertising.pcf"
transacted="false"
type="CSFPipeline" /-->

<pipeline
name="recordevent"
path="pipelines\recordevent.pcf"
transacted="false"
type="CSFPipeline" />
<!--END SAMPLE PIPELINE CONFIGURATION SECTIONS -->
</pipelines>
<!-- CACHES
Configure the caches you wish to use in your application
-->
<caches>
<!-- CACHE CONFIGURATION
Set the name of the cache to whatever string you wish to
use when referencing the cache.
Note that certain caches must have specific names when
using the default Advertising,
Discounting, and QueryCatalogInfo pipeline components.
These names are Advertising, Discount,
and QueryCatalogInfoCache respectively. The
refreshInterval should be set to a time value
(in seconds) that determines how long the cache remains in
memory before being refreshed.
The retryInterval should be set to a time value (in
seconds) that determines how long the
Cache Manager waits before attempting to call the cache
loader in the event of a failure
when calling the cache loader. Set maxSize to be the
maximum number of entries to
store in the cache.

Sample cache configuration sections have been provided
below.
-->
<!-- BEGIN SAMPLE CACHE CONFIGURATION SECTIONS-->
<!--cache
name="Advertising"
type="Advertising"
refreshInterval="900"
retryInterval="30" />

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

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

<cache
name="QueryCatalogInfoCache"
type="QCI"
loaderProgId="Commerce.LRUCacheFlush"
refreshInterval="0"
retryInterval="300"
maxSize="10000">
<config key="TableName"
value="CatalogCache_Virtual_Directory" />
</cache>
<!--END SAMPLE CACHE CONFIGURATION SECTIONS -->
</caches>
<!-- MESSAGE MANAGER
Configure the resources to extract from satellite
assemblies into the MessageManager
used by components in the Order Processing Pipelines.


-->
<!-- CULTURES
Set the default attribute to be the RFC 1766 identifier
of the default culture used
by the application. The baseName attribute specifies
the root name of the resources
used in your application. For example, when using a
satellite assembly named
"MyResources.en-US.resources", the root name is
"MyResources." The assembly attribute
is used to specify the name of the assembly containing
the default resources - either
the executing application or the name of a satellite
assembly.
-->
<!-- CULTURE
Set the id to be the RFC 1766 identifier of each
culture used by the application.-->
<!--messageManager>
<cultures default="en-US" baseName="oshoCommerce.MessageManager"
assembly="oshoCommerce">
<culture id="en-US" />
<culture id="fr-fr" />
<culture id="ja-JP" />
</cultures>

<resources>
<resource id= "pur_badsku" />
<resource id= "pur_badplacedprice" />

</resources>
</messageManager-->
<!-- RESOURCES
This configures the individual resource names to be
extracted from each satellite
assembly and placed in the MessageManager. Set the id
to the resource identifier for
each resource you wish to use.




-->
<!-- PROFILES
This configures the runtime to recognize two specific
profiles, the Organization and
User profiles, in order to make the CommerceContext
class aware of any changes made
to the default settings of these profiles. It is used
to determine where the
CommerceContext.GetCatalogsForUser() method looks for
Catalog Sets associated with
the current user. It is also used by the
CommerceContext.UserProfile property
to determine how to load user profiles on demand. These
configuration settings are
only required if you make changes to the default
UserObject or Organization profiles.
-->

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

<!-- COMMERCEEVENT
This configures the Commerce Events that will be available
for logging data to the IIS
web server log. The default events supported are
AddItemToBasket, RemoveItemFromBasket,
and SubmitOrder.
-->
<commerceEvent>
<add
className="Microsoft.CommerceServer.Runtime.AddItemToBasketEvent"
id="AddItemToBasket"/>
<add
className="Microsoft.CommerceServer.Runtime.RemoveItemFromBasketEvent"
id="RemoveItemFromBasket"/>
<add className="Microsoft.CommerceServer.Runtime.SubmitOrderEvent"
id="SubmitOrder" loggingEnabled="true"/>
</commerceEvent>
</CommerceServer>
<system.web>
<httpModules>
<!-- COMMERCE SERVER HTTP MODULES
These configuration sections are required for the Commerce
Server .NET Application
Framework to function properly. They must be registered
using the strong name for the
assemblies.
-->
<add name="CommerceApplication"
type="Microsoft.CommerceServer.Runtime.CommerceApplicationModule,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<add name="CommerceAuthentication"
type="Microsoft.CommerceServer.Runtime.CommerceAuthenticationModule,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<add name="CommerceOrder"
type="Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<add name="CommerceCatalog"
type="Microsoft.CommerceServer.Runtime.Catalog.CommerceCatalogModule,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<add name="CommerceProfile"
type="Microsoft.CommerceServer.Runtime.Profiles.CommerceProfileModule,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<add name="CommerceExpressionEvaluator"
type="Microsoft.CommerceServer.Runtime.Targeting.CommerceExpressionModule,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<add name="CommerceCache"
type="Microsoft.CommerceServer.Runtime.Caching.CommerceCacheModule,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<add name="CommerceContentSelection"
type="Microsoft.CommerceServer.Runtime.Targeting.CommerceContentSelectionModule,
Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
<!-- DYNAMIC DEBUG COMPILATION
Set compilation debug="true" to enable ASPX debugging.
Otherwise, setting this value to
false will improve runtime performance of this application.

Set compilation debug="true" to insert debugging symbols
(.pdb information)
into the compiled page. Because this creates a larger file
that executes
more slowly, you should set this value to true only when
debugging and to
false at all other times. For more information, refer to
the documentation about
debugging ASP .NET files.
-->
<compilation defaultLanguage="c#" debug="true">
<assemblies>
<add assembly="Microsoft.CommerceServer.Runtime,
Version=4.5.2002.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="GENIDLib, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>
<!-- CUSTOM ERROR MESSAGES
Set mode="on" or "remoteonly" to enable custom error
messages, "off" to disable. Add
<error> tags for each of the errors you want to handle.
-->
<customErrors mode="RemoteOnly"/>
<!-- AUTHENTICATION
This section sets the authentication policies of the
application. Possible modes are "Windows", "Forms",
"Passport" and "None"
-->
<authentication mode="Windows"/>
<!-- APPLICATION-LEVEL TRACE LOGGING
Application-level tracing enables trace log output for
every page within an application.
Set trace enabled="true" to enable application trace
logging. If pageOutput="true", the
trace information will be displayed at the bottom of each
page. Otherwise, you can view the
application trace log by browsing the "trace.axd" page from
your web application
root.
-->
<trace enabled="false" requestLimit="10" pageOutput="false"
traceMode="SortByTime" localOnly="true"/>
<!-- SESSION STATE SETTINGS
By default ASP.NET uses cookies to identify which requests
belong to a particular session.
If cookies are not available, a session can be tracked by
adding a session identifier to the URL.
To disable cookies, set sessionState cookieless="true".
-->
<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
source=127.0.0.1;user id=sa;password=" cookieless="false"
timeout="20"/>
<!-- GLOBALIZATION
This section sets the globalization settings of the
application.
-->
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
</system.web>
</configuration>


Regards,

Satya

Ravi Shankar

2006-02-02, 5:52 pm

Hi Bharath,

Could be a nit but in tyring to understand the web.config you pasted and
with all the line wraps it looks to me that the <contentselection> tag
appears before the <caches> tag which might be causing this issue (don't ask
me why )...

You can get a complete web.config from
http://msdn.microsoft.com/library/d...mework_neet.asp
--
Ravi Shankar


"bharath" wrote:

> we have some problem while accessing basket pipeline. here we are
> giving code. can any one give some solution for this problem.
> please give simple code for running pipeline.
>
>
> Error Displayed:
> ------------------------------------------------
>
> Component Execution failed for component[0x8] hr: 0x80004005 ProgID:
> Commerce.OrderDiscount.1 Dictionary error: Value for key 'CacheName' in
> dictionary 'context' missing (expected a variant of type 8)
> (orderform=default)
>
> ----------------------------------------------------------------
>
> Code listing for Basket.aspx.cs
>
> using System;
> using System.Collections;
> using System.ComponentModel;
> using System.Data;
> using System.Drawing;
> using System.Web;
> using System.Web.SessionState;
> using System.Web.UI;
> using System.Web.UI.WebControls;
> using System.Web.UI.HtmlControls;
> using Microsoft.CommerceServer.Runtime;
> using Microsoft.CommerceServer.Runtime.Profiles;
> using Microsoft.CommerceServer.Runtime.Orders;
> using Microsoft.CommerceServer.Runtime.Pipelines;
> using Microsoft.CommerceServer.Runtime.Catalog;
> using Microsoft.CommerceServer.Runtime.Diagnostics;
> using Microsoft.CommerceServer.Runtime.Caching;
>
>
> namespace oshoCommerce
> {
> /// <summary>
> /// Summary description for Basket.
> /// </summary>
> public class Basket : System.Web.UI.Page
> {
> protected System.Web.UI.WebControls.Label Status;
> protected System.Web.UI.WebControls.Button AddBtn;
> protected System.Web.UI.WebControls.Repeater BasketListing;
> protected System.Web.UI.WebControls.Label SubTotal;
> protected System.Web.UI.WebControls.Label Tax;
> protected System.Web.UI.WebControls.Label Total;
>
>
> //OrderContext ordersys= CommerceContext.Current.OrderSystem;
> Microsoft.CommerceServer.Runtime.Orders.Basket shoppingCart = null;
> private void Page_Load(object sender, System.EventArgs e)
> {
> if (!IsPostBack) {
> UpdateBasket();
> }
>
> }
> void UpdateBasket()
> {
>
> LineItem item = new LineItem();
> item.ProductCatalog = "Osho Commerce";
> item.ProductID = Request.QueryString ["ProductID"];
> item.Quantity = Convert.ToInt32(Request.QueryString ["Quantity"]);
> OrderContext orders = CommerceContext.Current.OrderSystem;
> OrderForm of = null;
>
>
> // This requires that the CommerceContext.UserID property already
> // be set. It can either be set dynamically if using Commerce
> Server
> // authentication, or manually.
> shoppingCart = orders.GetBasket(new
> System.Guid(CommerceContext.Current.UserID));
>
> // If the shopping cart has just been created, no order forms
> // will exist and thus, it is unusable. So a new, default
> // order form must be added.
> if (shoppingCart.OrderForms.Count == 0)
> {
> shoppingCart.OrderForms.Add(new OrderForm("default"));
>
> }
>
> shoppingCart.OrderForms["default"].LineItems. Add(item);
>
>
> // Execute the product pipeline to ensure we have the latest product
> // information in the basket.
> shoppingCart.RunPipeline(new PipelineInfo("BasketPipeline"));
>
> // Bind the default order form to the Repeater control used for
> // displaying its contents.
>
>
>
> BasketListing.DataSource =
> shoppingCart.OrderForms["default"].LineItems;
> BasketListing.DataBind();
>
> // Update information about the order.
> SubTotal.Text = String.Format("{0:C}", shoppingCart.SubTotal);
>
> // This data will not be available after running the basket pipeline
> // alone.
> Tax.Text = String.Format("{0:C}", shoppingCart.TaxTotal);
> Total.Text = String.Format("{0:C}", shoppingCart.Total);
>
> shoppingCart.Save();
>
> }
>
> public void AddBtn_Click(object source, EventArgs args)
> {
>
> OrderContext orders = CommerceContext.Current.OrderSystem;
>
> // Create and populate an instance of the LineItem class
> // that will be added to the order. If a product variation
> // was being added, the VariantID would need to be specified
> // for the LineItem instance.
> LineItem item = new LineItem();
> item.ProductCatalog = "Osho Commerce";
> item.ProductID = Request.QueryString ["ProductID"];
>
> item.Quantity = Convert.ToInt32(Request.QueryString ["Quantity"]);
>
> try
> {
>
> // This requires that the CommerceContext.UserID property already
> // be set. It can either be set dynamically if using Commerce
> Server
> // authentication, or manually.
> shoppingCart = orders.GetBasket(new
> System.Guid(CommerceContext.Current.UserID));
>
> // Try to add the new line item. If it fails, we will
> // present the user with a friendly error message.
> shoppingCart.OrderForms["default"].LineItems.Add(item);
>
> // Execute the product pipeline to ensure we have the latest
> product
> // information in the basket.
> shoppingCart.RunPipeline(new PipelineInfo("BasketPipeline"));
>
> shoppingCart.Save();
>
> }
> catch (Exception exc)
> {
>
> Status.Text = "Basket unavailable.";
> BasketListing.Visible = false;
> AddBtn.Visible = false;
> return;
> }
>
> UpdateBasket();
> }
>
>
> #region Web Form Designer generated code
> override protected void OnInit(EventArgs e)
> {
> //
> // CODEGEN: This call is required by the ASP.NET Web Form Designer.
> //
> InitializeComponent();
> base.OnInit(e);
> }
>
> /// <summary>
> /// Required method for Designer support - do not modify
> /// the contents of this method with the code editor.
> /// </summary>
> private void InitializeComponent()
> {
> this.Load += new System.EventHandler(this.Page_Load);
>
> }
> #endregion
> }
> }
>
>
> -------------------------------------------
>
> web.config settings
> ----------------------------
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <configuration>
> <configSections>
> <!-- COMMERCE SERVER CONFIGURATION SECTION HANDLERS
> These configuration sections are required for the Commerce
> Server .NET Application
> Framework to function properly. They must be registered
> using the strong name for the
> assemblies.
> -->
> <sectionGroup name="CommerceServer">
> <section name="application"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceApplicationSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="authentication"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceAuthenticationSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="pipelines"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommercePipelineSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="caches"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceCacheSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="messageManager"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceMessageManagerSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="catalog"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceCatalogSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="orders"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceOrdersSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="profiles"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceProfilesSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="contentSelection"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceContentSelectionSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="commerceEvent"
> type="Microsoft.CommerceServer.Runtime.Configuration.EventLoggerConfigurationHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> </sectionGroup>
> </configSections>
> <!-- COMMERCE SERVER CONFIGURATION SECTION
> This signifies the beginning of the configuration of the
> Commerce Server .NET
> Application Framework.
> -->
> <CommerceServer>
> <contentSelection>
> <add name="discounts" cacheName="discounts"
> selectionPipeline="discounts" eventPipeline="recordEvent"
> redirectUrl="./redir.aspx"/>
> </contentSelection>
> <!-- APPLICATION
> Set the siteName to be the name of the site as it has been
> registered in the Administration
> database. The Site Packager will update this attribute
> automatically when unpacking
> a site. Set debugLevel to "Checked", "Debug", or
> "Production". Because the "Checked" and
> "Debug" settings cause the application to run slower than
> normal, you should only use these
> values when debugging the application.
> -->
> <application siteName="oshoCommerce" debugLevel="Checked"/>
> <!-- AUTHENTICATION
> Set the ticketTimeOut to the appropriate timeout value for
> authentication tickets issued
> for the application. Set detectCookies to true if you wish
> to enable a cookie to URL-mode
> fallback authentication scheme.<A
> HREF="http://essserver/oshoCommerce/Web.config">http://essserver/oshoCommerce/Web.config</A>
> -->
> <authentication ticketTimeOut="30" detectCookies="true"/>
> <!-- PIPELINES
> Configure the pipelines you wish to use in your
> application.
> -->
> <pipelines>
> <!--PIPELINE CONFIGURATION
> Set the name of the pipeline to whatever string you wish to
> use when referencing the
> pipeline in your application. The path should be set to a
> the relative path of the pipeline
> configuration file (.PCF) that corresponds to the pipeline
> you wish to execute when
> referencing the pipeline in your application. Set
> transacted to false to disable COM+
> Transactions when executing your pipeline. The type should
> be set to either "OrderPipeline"
> or "CSFPipeline" depending on if you intend to use the
> pipeline for processing Orders or
> displaying advertisements. Set loggingEnabled to true to
> enable pipeline logging. The log

bharath

2006-02-03, 2:53 am

Dear Ravi,
Thank you for your timely response.We tried as you told. but it didn't
workout. please advise me. is it my .cs file coding is right or problem
with web.config alone.

Regards,
satya

bharath wrote:
> we have some problem while accessing basket pipeline. here we are
> giving code. can any one give some solution for this problem.
> please give simple code for running pipeline.
>
>
> Error Displayed:
> ------------------------------------------------
>
> Component Execution failed for component[0x8] hr: 0x80004005 ProgID:
> Commerce.OrderDiscount.1 Dictionary error: Value for key 'CacheName' in
> dictionary 'context' missing (expected a variant of type 8)
> (orderform=default)
>
> ----------------------------------------------------------------
>
> Code listing for Basket.aspx.cs
>
> using System;
> using System.Collections;
> using System.ComponentModel;
> using System.Data;
> using System.Drawing;
> using System.Web;
> using System.Web.SessionState;
> using System.Web.UI;
> using System.Web.UI.WebControls;
> using System.Web.UI.HtmlControls;
> using Microsoft.CommerceServer.Runtime;
> using Microsoft.CommerceServer.Runtime.Profiles;
> using Microsoft.CommerceServer.Runtime.Orders;
> using Microsoft.CommerceServer.Runtime.Pipelines;
> using Microsoft.CommerceServer.Runtime.Catalog;
> using Microsoft.CommerceServer.Runtime.Diagnostics;
> using Microsoft.CommerceServer.Runtime.Caching;
>
>
> namespace oshoCommerce
> {
> /// <summary>
> /// Summary description for Basket.
> /// </summary>
> public class Basket : System.Web.UI.Page
> {
> protected System.Web.UI.WebControls.Label Status;
> protected System.Web.UI.WebControls.Button AddBtn;
> protected System.Web.UI.WebControls.Repeater BasketListing;
> protected System.Web.UI.WebControls.Label SubTotal;
> protected System.Web.UI.WebControls.Label Tax;
> protected System.Web.UI.WebControls.Label Total;
>
>
> //OrderContext ordersys= CommerceContext.Current.OrderSystem;
> Microsoft.CommerceServer.Runtime.Orders.Basket shoppingCart = null;
> private void Page_Load(object sender, System.EventArgs e)
> {
> if (!IsPostBack) {
> UpdateBasket();
> }
>
> }
> void UpdateBasket()
> {
>
> LineItem item = new LineItem();
> item.ProductCatalog = "Osho Commerce";
> item.ProductID = Request.QueryString ["ProductID"];
> item.Quantity = Convert.ToInt32(Request.QueryString ["Quantity"]);
> OrderContext orders = CommerceContext.Current.OrderSystem;
> OrderForm of = null;
>
>
> // This requires that the CommerceContext.UserID property already
> // be set. It can either be set dynamically if using Commerce
> Server
> // authentication, or manually.
> shoppingCart = orders.GetBasket(new
> System.Guid(CommerceContext.Current.UserID));
>
> // If the shopping cart has just been created, no order forms
> // will exist and thus, it is unusable. So a new, default
> // order form must be added.
> if (shoppingCart.OrderForms.Count == 0)
> {
> shoppingCart.OrderForms.Add(new OrderForm("default"));
>
> }
>
> shoppingCart.OrderForms["default"].LineItems. Add(item);
>
>
> // Execute the product pipeline to ensure we have the latest product
> // information in the basket.
> shoppingCart.RunPipeline(new PipelineInfo("BasketPipeline"));
>
> // Bind the default order form to the Repeater control used for
> // displaying its contents.
>
>
>
> BasketListing.DataSource =
> shoppingCart.OrderForms["default"].LineItems;
> BasketListing.DataBind();
>
> // Update information about the order.
> SubTotal.Text = String.Format("{0:C}", shoppingCart.SubTotal);
>
> // This data will not be available after running the basket pipeline
> // alone.
> Tax.Text = String.Format("{0:C}", shoppingCart.TaxTotal);
> Total.Text = String.Format("{0:C}", shoppingCart.Total);
>
> shoppingCart.Save();
>
> }
>
> public void AddBtn_Click(object source, EventArgs args)
> {
>
> OrderContext orders = CommerceContext.Current.OrderSystem;
>
> // Create and populate an instance of the LineItem class
> // that will be added to the order. If a product variation
> // was being added, the VariantID would need to be specified
> // for the LineItem instance.
> LineItem item = new LineItem();
> item.ProductCatalog = "Osho Commerce";
> item.ProductID = Request.QueryString ["ProductID"];
>
> item.Quantity = Convert.ToInt32(Request.QueryString ["Quantity"]);
>
> try
> {
>
> // This requires that the CommerceContext.UserID property already
> // be set. It can either be set dynamically if using Commerce
> Server
> // authentication, or manually.
> shoppingCart = orders.GetBasket(new
> System.Guid(CommerceContext.Current.UserID));
>
> // Try to add the new line item. If it fails, we will
> // present the user with a friendly error message.
> shoppingCart.OrderForms["default"].LineItems.Add(item);
>
> // Execute the product pipeline to ensure we have the latest
> product
> // information in the basket.
> shoppingCart.RunPipeline(new PipelineInfo("BasketPipeline"));
>
> shoppingCart.Save();
>
> }
> catch (Exception exc)
> {
>
> Status.Text = "Basket unavailable.";
> BasketListing.Visible = false;
> AddBtn.Visible = false;
> return;
> }
>
> UpdateBasket();
> }
>
>
> #region Web Form Designer generated code
> override protected void OnInit(EventArgs e)
> {
> //
> // CODEGEN: This call is required by the ASP.NET Web Form Designer.
> //
> InitializeComponent();
> base.OnInit(e);
> }
>
> /// <summary>
> /// Required method for Designer support - do not modify
> /// the contents of this method with the code editor.
> /// </summary>
> private void InitializeComponent()
> {
> this.Load += new System.EventHandler(this.Page_Load);
>
> }
> #endregion
> }
> }
>
>
> -------------------------------------------
>
> web.config settings
> ----------------------------
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <configuration>
> <configSections>
> <!-- COMMERCE SERVER CONFIGURATION SECTION HANDLERS
> These configuration sections are required for the Commerce
> Server .NET Application
> Framework to function properly. They must be registered
> using the strong name for the
> assemblies.
> -->
> <sectionGroup name="CommerceServer">
> <section name="application"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceApplicationSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="authentication"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceAuthenticationSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="pipelines"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommercePipelineSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="caches"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceCacheSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="messageManager"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceMessageManagerSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="catalog"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceCatalogSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="orders"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceOrdersSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="profiles"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceProfilesSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="contentSelection"
> type="Microsoft.CommerceServer.Runtime.Configuration.CommerceContentSelectionSectionHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <section name="commerceEvent"
> type="Microsoft.CommerceServer.Runtime.Configuration.EventLoggerConfigurationHandler,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> </sectionGroup>
> </configSections>
> <!-- COMMERCE SERVER CONFIGURATION SECTION
> This signifies the beginning of the configuration of the
> Commerce Server .NET
> Application Framework.
> -->
> <CommerceServer>
> <contentSelection>
> <add name="discounts" cacheName="discounts"
> selectionPipeline="discounts" eventPipeline="recordEvent"
> redirectUrl="./redir.aspx"/>
> </contentSelection>
> <!-- APPLICATION
> Set the siteName to be the name of the site as it has been
> registered in the Administration
> database. The Site Packager will update this attribute
> automatically when unpacking
> a site. Set debugLevel to "Checked", "Debug", or
> "Production". Because the "Checked" and
> "Debug" settings cause the application to run slower than
> normal, you should only use these
> values when debugging the application.
> -->
> <application siteName="oshoCommerce" debugLevel="Checked"/>
> <!-- AUTHENTICATION
> Set the ticketTimeOut to the appropriate timeout value for
> authentication tickets issued
> for the application. Set detectCookies to true if you wish
> to enable a cookie to URL-mode
> fallback authentication scheme.<A
> HREF="http://essserver/oshoCommerce/Web.config">http://essserver/oshoCommerce/Web.config</A>
> -->
> <authentication ticketTimeOut="30" detectCookies="true"/>
> <!-- PIPELINES
> Configure the pipelines you wish to use in your
> application.
> -->
> <pipelines>
> <!--PIPELINE CONFIGURATION
> Set the name of the pipeline to whatever string you wish to
> use when referencing the
> pipeline in your application. The path should be set to a
> the relative path of the pipeline
> configuration file (.PCF) that corresponds to the pipeline
> you wish to execute when
> referencing the pipeline in your application. Set
> transacted to false to disable COM+
> Transactions when executing your pipeline. The type should
> be set to either "OrderPipeline"
> or "CSFPipeline" depending on if you intend to use the
> pipeline for processing Orders or
> displaying advertisements. Set loggingEnabled to true to
> enable pipeline logging. The log
> will be created in the "pipelines\log" directory of your
> application. Note that this
> causes the application to run slower than normal so it
> should only be enabled during
> debugging.
>
> Sample pipeline configuration sections have been provided
> below.
> -->
> <!-- BEGIN SAMPLE PIPELINE CONFIGURATION SECTIONS-->
> <pipeline
> name="BasketPipeline"
> path="Pipelines\BasketPipeline.pcf"
> transacted="false"
> type="OrderPipeline"
> loggingEnabled="true" />
> <pipeline
> name="discounts"
> path="pipelines\discounts.pcf"
> transacted="false"
> type="CSFPipeline" />
> <!--pipeline
> name="ProductPipeline"
> path="Pipelines\ProductPipeline.pcf"
> transacted="false"
> type="OrderPipeline"
> loggingEnabled="true" />
>
> <pipeline
> name="checkout"
> path="pipelines\checkout.pcf"
> transacted="true"
> type="OrderPipeline"
> loggingEnabled="true" />
>
> <pipeline
> name="total"
> path="pipelines\total.pcf"
> transacted="false"
> type="OrderPipeline"
> loggingEnabled="true" />
>
> <pipeline
> name="advertising"
> path="pipelines\advertising.pcf"
> transacted="false"
> type="CSFPipeline" /-->
>
> <pipeline
> name="recordevent"
> path="pipelines\recordevent.pcf"
> transacted="false"
> type="CSFPipeline" />
> <!--END SAMPLE PIPELINE CONFIGURATION SECTIONS -->
> </pipelines>
> <!-- CACHES
> Configure the caches you wish to use in your application
> -->
> <caches>
> <!-- CACHE CONFIGURATION
> Set the name of the cache to whatever string you wish to
> use when referencing the cache.
> Note that certain caches must have specific names when
> using the default Advertising,
> Discounting, and QueryCatalogInfo pipeline components.
> These names are Advertising, Discount,
> and QueryCatalogInfoCache respectively. The
> refreshInterval should be set to a time value
> (in seconds) that determines how long the cache remains in
> memory before being refreshed.
> The retryInterval should be set to a time value (in
> seconds) that determines how long the
> Cache Manager waits before attempting to call the cache
> loader in the event of a failure
> when calling the cache loader. Set maxSize to be the
> maximum number of entries to
> store in the cache.
>
> Sample cache configuration sections have been provided
> below.
> -->
> <!-- BEGIN SAMPLE CACHE CONFIGURATION SECTIONS-->
> <!--cache
> name="Advertising"
> type="Advertising"
> refreshInterval="900"
> retryInterval="30" />
>
> <cache
> name="SampleRegionalTaxCache"
> type="Tax"
> refreshInterval="0"
> retryInterval="30" />
>
> <cache
> name="ShippingManagerCache"
> type="Shipping"
> loaderProgId="Commerce.ShippingManagerCache"
> refreshInterval="0"
> retryInterval="30" /-->
> <cache
> name="Discounts"
> type="Discounts"
> refreshInterval="0"
> retryInterval="30" />
>
> <cache
> name="QueryCatalogInfoCache"
> type="QCI"
> loaderProgId="Commerce.LRUCacheFlush"
> refreshInterval="0"
> retryInterval="300"
> maxSize="10000">
> <config key="TableName"
> value="CatalogCache_Virtual_Directory" />
> </cache>
> <!--END SAMPLE CACHE CONFIGURATION SECTIONS -->
> </caches>
> <!-- MESSAGE MANAGER
> Configure the resources to extract from satellite
> assemblies into the MessageManager
> used by components in the Order Processing Pipelines.
>
>
> -->
> <!-- CULTURES
> Set the default attribute to be the RFC 1766 identifier
> of the default culture used
> by the application. The baseName attribute specifies
> the root name of the resources
> used in your application. For example, when using a
> satellite assembly named
> "MyResources.en-US.resources", the root name is
> "MyResources." The assembly attribute
> is used to specify the name of the assembly containing
> the default resources - either
> the executing application or the name of a satellite
> assembly.
> -->
> <!-- CULTURE
> Set the id to be the RFC 1766 identifier of each
> culture used by the application.-->
> <!--messageManager>
> <cultures default="en-US" baseName="oshoCommerce.MessageManager"
> assembly="oshoCommerce">
> <culture id="en-US" />
> <culture id="fr-fr" />
> <culture id="ja-JP" />
> </cultures>
>
> <resources>
> <resource id= "pur_badsku" />
> <resource id= "pur_badplacedprice" />
>
> </resources>
> </messageManager-->
> <!-- RESOURCES
> This configures the individual resource names to be
> extracted from each satellite
> assembly and placed in the MessageManager. Set the id
> to the resource identifier for
> each resource you wish to use.
>
>
>
>
> -->
> <!-- PROFILES
> This configures the runtime to recognize two specific
> profiles, the Organization and
> User profiles, in order to make the CommerceContext
> class aware of any changes made
> to the default settings of these profiles. It is used
> to determine where the
> CommerceContext.GetCatalogsForUser() method looks for
> Catalog Sets associated with
> the current user. It is also used by the
> CommerceContext.UserProfile property
> to determine how to load user profiles on demand. These
> configuration settings are
> only required if you make changes to the default
> UserObject or Organization profiles.
> -->
>
> <!--profiles>
> <userProfile
> profileDefinition="UserObject"
> userIdProperty="GeneralInfo.logon_name"
> organizationIdProperty="AccountInfo.org_id"
> catalogSetIdProperty="AccountInfo.user_catalog_set"
> />
> <organizationProfile
> profileDefintion="Organization"
> organizationIdProperty="GeneralInfo.org_id"
> catalogSetIdProperty="G eneralInfo.org_catalog_set"
> />
> </profiles-->
>
> <!-- COMMERCEEVENT
> This configures the Commerce Events that will be available
> for logging data to the IIS
> web server log. The default events supported are
> AddItemToBasket, RemoveItemFromBasket,
> and SubmitOrder.
> -->
> <commerceEvent>
> <add
> className="Microsoft.CommerceServer.Runtime.AddItemToBasketEvent"
> id="AddItemToBasket"/>
> <add
> className="Microsoft.CommerceServer.Runtime.RemoveItemFromBasketEvent"
> id="RemoveItemFromBasket"/>
> <add className="Microsoft.CommerceServer.Runtime.SubmitOrderEvent"
> id="SubmitOrder" loggingEnabled="true"/>
> </commerceEvent>
> </CommerceServer>
> <system.web>
> <httpModules>
> <!-- COMMERCE SERVER HTTP MODULES
> These configuration sections are required for the Commerce
> Server .NET Application
> Framework to function properly. They must be registered
> using the strong name for the
> assemblies.
> -->
> <add name="CommerceApplication"
> type="Microsoft.CommerceServer.Runtime.CommerceApplicationModule,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <add name="CommerceAuthentication"
> type="Microsoft.CommerceServer.Runtime.CommerceAuthenticationModule,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <add name="CommerceOrder"
> type="Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <add name="CommerceCatalog"
> type="Microsoft.CommerceServer.Runtime.Catalog.CommerceCatalogModule,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <add name="CommerceProfile"
> type="Microsoft.CommerceServer.Runtime.Profiles.CommerceProfileModule,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <add name="CommerceExpressionEvaluator"
> type="Microsoft.CommerceServer.Runtime.Targeting.CommerceExpressionModule,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <add name="CommerceCache"
> type="Microsoft.CommerceServer.Runtime.Caching.CommerceCacheModule,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> <add name="CommerceContentSelection"
> type="Microsoft.CommerceServer.Runtime.Targeting.CommerceContentSelectionModule,
> Microsoft.CommerceServer.Runtime, Version=4.5.2002.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> </httpModules>
> <!-- DYNAMIC DEBUG COMPILATION
> Set compilation debug="true" to enable ASPX debugging.
> Otherwise, setting this value to
> false will improve runtime performance of this application.
>
> Set compilation debug="true" to insert debugging symbols
> (.pdb information)
> into the compiled page. Because this creates a larger file
> that executes
> more slowly, you should set this value to true only when
> debugging and to
> false at all other times. For more information, refer to
> the documentation about
> debugging ASP .NET files.
> -->
> <compilation defaultLanguage="c#" debug="true">
> <assemblies>
> <add assembly="Microsoft.CommerceServer.Runtime,
> Version=4.5.2002.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
> <add assembly="GENIDLib, Version=1.0.0.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"/>
> </assemblies>
> </compilation>
> <!-- CUSTOM ERROR MESSAGES
> Set mode="on" or "remoteonly" to enable custom error
> messages, "off" to disable. Add
> <error> tags for each of the errors you want to handle.
> -->
> <customErrors mode="RemoteOnly"/>
> <!-- AUTHENTICATION
> This section sets the authentication policies of the
> application. Possible modes are "Windows", "Forms",
> "Passport" and "None"
> -->
> <authentication mode="Windows"/>
> <!-- APPLICATION-LEVEL TRACE LOGGING
> Application-level tracing enables trace log output for
> every page within an application.
> Set trace enabled="true" to enable application trace
> logging. If pageOutput="true", the
> trace information will be displayed at the bottom of each
> page. Otherwise, you can view the
> application trace log by browsing the "trace.axd" page from
> your web application
> root.
> -->
> <trace enabled="false" requestLimit="10" pageOutput="false"
> traceMode="SortByTime" localOnly="true"/>
> <!-- SESSION STATE SETTINGS
> By default ASP.NET uses cookies to identify which requests
> belong to a particular session.
> If cookies are not available, a session can be tracked by
> adding a session identifier to the URL.
> To disable cookies, set sessionState cookieless="true".
> -->
> <sessionState mode="InProc"
> stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
> source=127.0.0.1;user id=sa;password=" cookieless="false"
> timeout="20"/>
> <!-- GLOBALIZATION
> This section sets the globalization settings of the
> application.
> -->
> <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
> </system.web>
> </configuration>
>
>
> Regards,
>
> Satya


Ravi Shankar

2006-02-03, 7:48 am

Hi Bharath,

Your cs file coding seems to be identical (with the exception of catalog &
product information) to the sample code available in the documentation at
http://msdn.microsoft.com/library/?....asp?frame=true

I see you've enable tracing for the pipelines.. so perhaps going through the
trace might provide some additional information.
--
Ravi Shankar


"bharath" wrote:
[vbcol=seagreen]
> Dear Ravi,
> Thank you for your timely response.We tried as you told. but it didn't
> workout. please advise me. is it my .cs file coding is right or problem
> with web.config alone.
>
> Regards,
> satya
>
> bharath wrote:
Ravi Shankar

2006-02-03, 5:53 pm

Are you by any chance using Commerce Server Feature pack 1 ? If so then the
name of the discounts cache is different (the exact name for the cache is
mentioned in the Post-Fp1 implementation steps in the documentation.
--
Ravi Shankar


"Ravi Shankar" wrote:
[vbcol=seagreen]
> Hi Bharath,
>
> Your cs file coding seems to be identical (with the exception of catalog &
> product information) to the sample code available in the documentation at
> http://msdn.microsoft.com/library/?....asp?frame=true
>
> I see you've enable tracing for the pipelines.. so perhaps going through the
> trace might provide some additional information.
> --
> Ravi Shankar
>
>
> "bharath" wrote:
>
bharath

2006-02-07, 2:48 am

Dear Ravi,

we can able get product information from basket.pcf pipeline. but we
are getting problems with discount.pcf pipeline.
The following error displayed as follows:
--------------------------
Component Execution failed for component[0x8] hr: 0x80004005 ProgID:
Commerce.OrderDiscount.1 Dictionary error: Value for key 'CacheName' in
dictionary 'context' missing (expected a variant of type 8)
(orderform=default)
---------------------------
When we checked the logs we are getting problem at "OrderDiscount"
component. can you please advise me what to do. we dont have any clue
how to solve this.

Regards,

bharath

Ravi Shankar

2006-02-07, 2:48 am

Hi Bharath,

You did not answer whether or not you're using Commerce Server FP1. It seems
to me that you're facing this issue because you're using FP1 and have not
migrated your Discounts cache. If you're using FP1 please refer to the
section titled "Checklist for Migration of Discounts to the New Marketing
Resource" in the updated Commerce Server documentation for exact steps. I
think that will rid you of this error.
--
Ravi Shankar


"bharath" wrote:

> Dear Ravi,
>
> we can able get product information from basket.pcf pipeline. but we
> are getting problems with discount.pcf pipeline.
> The following error displayed as follows:
> --------------------------
> Component Execution failed for component[0x8] hr: 0x80004005 ProgID:
> Commerce.OrderDiscount.1 Dictionary error: Value for key 'CacheName' in
> dictionary 'context' missing (expected a variant of type 8)
> (orderform=default)
> ---------------------------
> When we checked the logs we are getting problem at "OrderDiscount"
> component. can you please advise me what to do. we dont have any clue
> how to solve this.
>
> Regards,
>
> bharath
>
>

bharath

2006-02-07, 2:48 am

Dear Ravi,

We are using SP3 not Commerce Server FP1. I forgot to mention in the
previous reply.

Regards,
bharath

Ravi Shankar

2006-02-07, 6:00 pm

Hi Bharath,

Well I went back to your web.config file and it took me all of half a day to
get it into something I could read and understand I have some observations
in this regards
1. You have commented out the "message manager" - Not GOOD
2. You have commented out the "Profiles" section - Not GOOD because your
site won't recongnize user in CommerceContext and similarly the discount
cache will have problems evaluating the user based conditions
3. you have commented out "ShippingManagerCache", "SampleRegionalTax"
caches - Not GOOD because one of the discounts could be "free shipping"

I would recommend that you uncomment this and try (after an IISRESET)
--
Ravi Shankar


"bharath" wrote:

> Dear Ravi,
>
> We are using SP3 not Commerce Server FP1. I forgot to mention in the
> previous reply.
>
> Regards,
> bharath
>
>

bharath

2006-02-08, 7:48 am

hi ravi,

as i mentioned before we are using SP3 not Commerce Server FP1. still
we are in same stage. plese help us how to solve this discount pipeline
problem.

Regards,
bharath

Ravi Shankar

2006-02-08, 5:55 pm

Bharath,

if uncommenting various sections as per my previous reply did not work then
I'm out of depth here... I would strongly recommend logging a support call
and getting this issue resolved.
--
Ravi Shankar


"bharath" wrote:

> hi ravi,
>
> as i mentioned before we are using SP3 not Commerce Server FP1. still
> we are in same stage. plese help us how to solve this discount pipeline
> problem.
>
> Regards,
> bharath
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com