Server Error in '/' Application.

Attempted to divide by zero.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.DivideByZeroException: Attempted to divide by zero.

Source Error:


Line 30:         if (product != null) 
Line 31:         {
Line 32:             discount = PromotionService.SetProductPricing(product);
Line 33:         }
Line 34:         attList.Product = product;

Source File: d:\LamboGear\lg\Commerce.Web\Modules\Products\ProductTopDisplay.ascx.cs    Line: 32

Stack Trace:


[DivideByZeroException: Attempted to divide by zero.]
   System.Decimal.FCallDivide(Decimal& result, Decimal d1, Decimal d2) +0
   System.Decimal.Divide(Decimal d1, Decimal d2) +89
   System.Decimal.op_Division(Decimal d1, Decimal d2) +34
   Commerce.Promotions.PromotionService.SetProductPricing(Product product) in D:\@CSK\Releases\CSK_2_Beta3\Commerce.Promotions\PromotionService.cs:109
   Modules_Products_ProductTopDisplay.Page_Load(Object sender, EventArgs e) in d:\LamboGear\lg\Commerce.Web\Modules\Products\ProductTopDisplay.ascx.cs:32
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433