Solved

Where to look for the cause of a System.IndexOutOfRangeException

Posted on 2008-10-02
2
282 Views
Last Modified: 2013-12-17
I have web application that updates and creates new records in a database. The application was working fine, but now I'm getting an exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.

I did not code this and am not really a strong C# coder, although I can read through the code and understand the basics plus make small changes. I do not have any arrays in this particular page (that I can find).
Any suggestions on where to start troubleshooting this?

Thanks
0
Comment
Question by:Jgbyrd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
Marcjev earned 250 total points
ID: 22628039
Some of the classes you use will have indexes (a collection of some sort).

Simplest thing would be running in the debugger. You could then stop at the error and find the right place the most simple way. Otherwise you should set the options in the application (IIS) to send all errors to de browser, so you would get a  view of the callstack there.
0
 
LVL 26

Assisted Solution

by:Anurag Thakur
Anurag Thakur earned 250 total points
ID: 22628174
you might be using collections, lists means classes from which values/objects can be retrieved by using indexers.
when you do debugging and the error comes then check the stack trace it will give you which function threw the error or even on which line the exception came.

if you can share that information with us we might be able to help you better
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question