Page 1 of 1

Error on 7.0.7

Posted: Thu May 12, 2011 5:43 am
by abhs
Hi,
i have been getting this error while clicking on different areas within the cart and also in Admin account. is there a resolution to this.

Stack Trace:

[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.Collections.CollectionBase.RemoveAt(Int32 index) +3945956
CommerceBuilder.Common.PersistentCollection`1.DeleteAt(Int32 index) +72
CommerceBuilder.Shipping.ShipRateCalculator.a(Basket A_0) +237
CommerceBuilder.Shipping.ShipRateCalculator.Calculate(Basket basket) +162
CommerceBuilder.Orders.Basket.Recalculate() +66
Admin_Orders_Create_CreateOrder2.Page_PreRender(Object sender, EventArgs e) +23
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnPreRender(EventArgs e) +11029278
System.Web.UI.Control.PreRenderRecursiveInternal() +108
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394


Version Information: Microsoft .NET Framework Version:2.0.50727.4211; ASP.NET Version:2.0.50727.4209

Regards,

Abhi

Re: Error on 7.0.7

Posted: Tue May 17, 2011 7:50 am
by mazhar
Well can you describe exactly in which part of application you saw this issue. Secondly when you see this issue can you tell which products are in your basket at that time. Also type of the products like they are simple products or kits. If you can provide one scenario by which you can reproduce this issue reliably then it would help a lot.

Re: Error on 7.0.7

Posted: Tue May 17, 2011 4:47 pm
by abhs
hi,

When you are logged in as a user and browse through different products in the shopping cart and randomly you get this error, they are all simple products.

please find error report attached.

Server Error in '/Shop' Application.
--------------------------------------------------------------------------------

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
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.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:


[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.Collections.CollectionBase.RemoveAt(Int32 index) +3945956
CommerceBuilder.Common.PersistentCollection`1.DeleteAt(Int32 index) +72
CommerceBuilder.Shipping.ShipRateCalculator.a(Basket A_0) +237
CommerceBuilder.Shipping.ShipRateCalculator.Calculate(Basket basket) +162
CommerceBuilder.Orders.Basket.Recalculate() +66
ConLib_MiniBasket.Page_PreRender(Object sender, EventArgs e) +63
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
System.Web.UI.Control.OnPreRender(EventArgs e) +11029278
System.Web.UI.Control.PreRenderRecursiveInternal() +108
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4211; ASP.NET Version:2.0.50727.4209

i have also attached below the error log -

5/18/2011 9:26:05 AM Error An error has occured at http://www.xyz.com.au/Shop/Product.aspx?ProductId=11949 Exception of type 'System.Web.HttpUnhandledException' was thrown.; Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
5/18/2011 9:25:51 AM Error An error has occured at http://www.xyz.com.au/Shop/Product.aspx?ProductId=11928 Exception of type 'System.Web.HttpUnhandledException' was thrown.; Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
5/18/2011 9:24:08 AM Error An error has occured at http://www.xyz.com.au/Shop/Product.aspx?ProductId=11928 Exception of type 'System.Web.HttpUnhandledException' was thrown.; Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

hope this is sufficient to get to the core of this issue.

regards,

Abhinav

Re: Error on 7.0.7

Posted: Thu May 19, 2011 11:44 am
by AbleMods
Create a brand new product and try viewing it from the visitor-side. Does that new product cause the same error?