473,657 Members | 2,540 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:
[ArgumentOutOfRa ngeException: Index was out of range. Must be non-negative
and less than the size of the collection.
Parameter name: index]
System.Collecti ons.ArrayList.g et_Item(Int32 index) +91
System.Web.UI.W ebControls.Data GridItemCollect ion.get_Item(In t32 index) +10
MyApp.Forms.Com panyMaint.dgCom panyMaint_Edit( Object sender,
DataGridCommand EventArgs e) +99
System.Web.UI.W ebControls.Data Grid.OnEditComm and(DataGridCom mandEventArgs
e) +109
System.Web.UI.W ebControls.Data Grid.OnBubbleEv ent(Object source, EventArgs
e) +466
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +26
System.Web.UI.W ebControls.Data GridItem.OnBubb leEvent(Object source,
EventArgs e) +100
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +26
System.Web.UI.W ebControls.Link Button.OnComman d(CommandEventA rgs e) +120

System.Web.UI.W ebControls.Link Button.System.W eb.UI.IPostBack EventHandler.Ra isePostBackEven t(String eventArgument) +115
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +138
System.Web.UI.P age.ProcessRequ estMain() +1292


Nov 19 '05 #1
1 1925
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:
[ArgumentOutOfRa ngeException: Index was out of range. Must be non-negative
and less than the size of the collection.
Parameter name: index]
System.Collecti ons.ArrayList.g et_Item(Int32 index) +91
System.Web.UI.W ebControls.Data GridItemCollect ion.get_Item(In t32 index) +10
MyApp.Forms.Com panyMaint.dgCom panyMaint_Edit( Object sender,
DataGridCommand EventArgs e) +99
System.Web.UI.W ebControls.Data Grid.OnEditComm and(DataGridCom mandEventArgs
e) +109
System.Web.UI.W ebControls.Data Grid.OnBubbleEv ent(Object source, EventArgs
e) +466
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +26
System.Web.UI.W ebControls.Data GridItem.OnBubb leEvent(Object source,
EventArgs e) +100
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +26
System.Web.UI.W ebControls.Link Button.OnComman d(CommandEventA rgs e) +120

System.Web.UI.W ebControls.Link Button.System.W eb.UI.IPostBack EventHandler.Ra isePostBackEven t(String eventArgument) +115
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +138
System.Web.UI.P age.ProcessRequ estMain() +1292


Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2249
by: jb_in_marietta | last post by:
I have a Dot Net project that references a COM DLL called "Crypto.dll," which is registered on my machine. I added the reference via the "Add Reference" dialog in Visual Studio Dot Net, and I am successfully accessing methods in this DLL in some of my classes. "Interop.CRYPTOLib" is the name of the interop VS.NET created for me when I added the reference. Frequently, when I try to run my application, I get the error that follows.
2
1111
by: gary | last post by:
I am using VS.NET 2003 on XP I intermittently get Access is denied '' at the line <add assembly="*"/> in machine.config I have disabled indexing service and I am not running any form of anti-virus software. I have looked at filemonitor from sysinternals and it tells me the aspnet_wp
1
2524
by: Clark Choi | last post by:
I ran the sample application called Petstore from msdn. Everything went fine until I tested Update button on the web form to update the database through Datagrid. I have been searching the web to track down this error, but none of them really explain this problem/solution very well. I tried hard to debug this, but debuggin itself was impossible. The error message is as follows:
2
3088
by: Fabian | last post by:
Hi, I work with asp.net 2.0 and I have a intermittent error, only happens a few times a day. In the page I evaluate a Query String and then I get data form a database. The code snipped: try {
1
1223
by: deevoy | last post by:
Hi- I'm developing a asp.net web application and everything has proven fine on the dev and acceptance environment. We've moved the code up to our windows server 2003 prod environment and get the following intermittent error when browsing the web page through a client browser (the action causing this is paging though a datagrid- although it randomly errors, rather than erroring all the time):
0
1219
by: Shane C | last post by:
Intermittent Error: Server was unable to process request  Object reference not set to an instance of an object I have windows application that references a XML web service on our web server. The application sends and receives information fine most of the time. We do, mostly during peak usage hours, receive the above mentioned error. 1. What would cause the intermittent nature? 2. What can be done to fix this problem?
0
1868
by: Hawksey | last post by:
Hello, Has anyone else experienced a similar problem. We get an intermittent error trying to send mail using smtpmail. Our SmtpMail.SmtpServer is a different server to our web application servers. Every now and again my error logs will indicate that the sendmail method failed with the exception "Could not Access CDO Message Object" with an inner exception of "The transport failed to connect to the server". The funny thing is the method...
4
9782
by: Russell Warren | last post by:
I've been having a hard time tracking down a very intermittent problem where I get a "permission denied" error when trying to rename a file to something that has just been deleted (on win32). The code snippet that gets repeatedly called is here: ... if os.path.exists(oldPath): os.remove(oldPath) os.rename(newPath, oldPath)
0
2139
by: dalaeth | last post by:
I have searched Google high and low and haven't found anything that works. Here's my problem, hopefully someone will be able to help! I'm using 1.1 Framework, and ODP.NET 9.5.0.7 on a Windows 2003 Server. I have a cached DataSet that I fill using an OracleDataAdapter. Changes are made to that dataset in memory and as rows are changed, they are updated back to the database using OracleDataAdapter.Update(DataRow). Every few minutes, I...
0
8425
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8326
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8522
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6177
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4333
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2745
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1736
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.