mscorlib errors

mscorlib errors

Old forum URL:

mase posted on Wednesday, June 04, 2008

I am getting lots of mscorlib errors from inconsistent pages and method calls. It doesn't always happen, but I am getting these errors a lot at times from many pages and different methods. Here are a couple of the stack traces.
1    Index was out of range. Must be non-negative and less than the size of the collection.
2 Parameter name: index
3 Exception type 'System.ArgumentOutOfRangeException' was caught.
4 Source: mscorlib
5 Target Site: Void ThrowArgumentOutOfRangeException(System.ExceptionArgument, System.ExceptionResource)
6 Stack Trace:
7 at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
8 at System.ThrowHelper.ThrowArgumentOutOfRangeException()
9 at System.Collections.Generic.List`1.get_Item(Int32 index)
10 at Forums_Thread.DataBind()
11 at Forums_Thread.Page_Load(Object sender, EventArgs e)
12 at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
13 at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
14 at System.Web.UI.Control.OnLoad(EventArgs e)
15 at CustomNamespace.UI.BasePage.OnLoad(EventArgs e)
16 at System.Web.UI.Control.LoadRecursive()
17 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Here is another one:

1    Timestamp: 6/3/2008 3:30:11 PM
2 Request.FilePath: /Default.aspx
4 Index was outside the bounds of the array.
5 Exception type 'System.IndexOutOfRangeException' was caught.
6 Source: mscorlib
7 Target Site: Void Insert(TKey, TValue, Boolean)
8 Stack Trace:
9 at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
10 at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
11 at Csla.Security.SharedAuthorizationRules.GetManager(Type objectType, Boolean create) in C:\www\mySite\v6\CSLA\Security\SharedAuthorizationRules.cs:line 36
12 at Csla.Security.AuthorizationRules.get_TypeRules() in C:\www\mySite\v6\CSLA\Security\AuthorizationRules.cs:line 50
13 at Csla.Security.AuthorizationRules.HasReadAllowedRoles(String propertyName) in C:\www\mySite\v6\CSLA\Security\AuthorizationRules.cs:line 226
14 at Csla.ReadOnlyBase`1.CanReadProperty(String propertyName) in C:\www\mySite\v6\CSLA\ReadOnlyBase.cs:line 258
15 at Csla.ReadOnlyBase`1.CanReadProperty(Boolean throwOnFalse) in C:\www\mySite\v6\CSLA\ReadOnlyBase.cs:line 187
16 at CustomNamespace.BusinessObjects.ArticleInfo.get_StoryID() in C:\www\mySite\v6\BusinessObjects\Objects\ArticleInfo.cs:line 47
17 at CustomNamespace.UI.Controls_Newswire.GetTitleLink(Object obj)
18 at ASP.controls_newswire_ascx.__DataBind__control5(Object sender, EventArgs e)
19 at System.Web.UI.Control.OnDataBinding(EventArgs e)
20 at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
21 at System.Web.UI.Control.DataBind()
22 at System.Web.UI.Control.DataBindChildren()
23 at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
24 at System.Web.UI.Control.DataBind()
25 at System.Web.UI.Control.DataBindChildren()
26 at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
27 at System.Web.UI.Control.DataBind()
28 at System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem)
29 at System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource)
30 at System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e)
31 at System.Web.UI.WebControls.Repeater.DataBind()
32 at CustomNamespace.UI.Controls_Newswire.OnLoad(EventArgs e)
33 at System.Web.UI.Control.LoadRecursive()
34 at System.Web.UI.Control.LoadRecursive()
35 at System.Web.UI.Control.LoadRecursive()
36 at System.Web.UI.Control.LoadRecursive()
37 at System.Web.UI.Control.LoadRecursive()
38 at System.Web.UI.Control.LoadRecursive()
39 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 I would normally go about debugging this in a traditional fashion, but they are all coming from different sources! When I try to reproduce these errors myself, I cannot. Is there something going on with CSLA here?

Can someone explain a bit about what mscorlib is and how severe some of these errors are?

ajj3085 replied on Thursday, June 05, 2008

I would check your collection code, since it looks like the errors only happen when you DataBind something.

Copyright (c) Marimer LLC