469,648 Members | 1,190 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,648 developers. It's quick & easy.

Intermittent "Index was out of range." error

I'm getting the following error on an EditCommand event. This code is
running on production web farm and the thing is it doesn't happen all the
time. If I get this error, click the back button, and try again it works.
Sometimes it works the first time in.

I tried to step through the debugger running locally but I can't duplicate it.

Server Error in '/' Application.
----------------------------------------
Index was out of range. Must be non-negative and less than the size of the
collection. Parameter name: index

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.ArrayList.get_Item(Int32 index) +91
System.Web.UI.WebControls.DataGridItemCollection.g et_Item(Int32 index) +10
MyApp.Forms.CompanyMaint.dgCompanyMaint_Edit(Objec t sender,
DataGridCommandEventArgs e) +99
System.Web.UI.WebControls.DataGrid.OnEditCommand(D ataGridCommandEventArgs
e) +109
System.Web.UI.WebControls.DataGrid.OnBubbleEvent(O bject source, EventArgs
e) +466
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
System.Web.UI.WebControls.DataGridItem.OnBubbleEve nt(Object source,
EventArgs e) +100
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e) +120

System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +115
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +138
System.Web.UI.Page.ProcessRequestMain() +1292


Nov 19 '05 #1
1 1719
Nevermind. I didn't have the SqlServer state configured when I migrated to
the web farm which was the root cause of the problem.

Dave

"Dave" wrote:
I'm getting the following error on an EditCommand event. This code is
running on production web farm and the thing is it doesn't happen all the
time. If I get this error, click the back button, and try again it works.
Sometimes it works the first time in.

I tried to step through the debugger running locally but I can't duplicate it.

Server Error in '/' Application.
----------------------------------------
Index was out of range. Must be non-negative and less than the size of the
collection. Parameter name: index

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.ArrayList.get_Item(Int32 index) +91
System.Web.UI.WebControls.DataGridItemCollection.g et_Item(Int32 index) +10
MyApp.Forms.CompanyMaint.dgCompanyMaint_Edit(Objec t sender,
DataGridCommandEventArgs e) +99
System.Web.UI.WebControls.DataGrid.OnEditCommand(D ataGridCommandEventArgs
e) +109
System.Web.UI.WebControls.DataGrid.OnBubbleEvent(O bject source, EventArgs
e) +466
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
System.Web.UI.WebControls.DataGridItem.OnBubbleEve nt(Object source,
EventArgs e) +100
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e) +120

System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +115
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +138
System.Web.UI.Page.ProcessRequestMain() +1292


Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by gary | last post: by
reply views Thread by Shane C | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.