Intermittent "Index was out of range." error

G

Guest

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.get_Item(Int32 index) +10
MyApp.Forms.CompanyMaint.dgCompanyMaint_Edit(Object sender,
DataGridCommandEventArgs e) +99
System.Web.UI.WebControls.DataGrid.OnEditCommand(DataGridCommandEventArgs
e) +109
System.Web.UI.WebControls.DataGrid.OnBubbleEvent(Object source, EventArgs
e) +466
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
System.Web.UI.WebControls.DataGridItem.OnBubbleEvent(Object source,
EventArgs e) +100
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +120

System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +115
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +138
System.Web.UI.Page.ProcessRequestMain() +1292
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top