Solved

Where to look for the cause of a System.IndexOutOfRangeException

Posted on 2008-10-02
2
279 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# Service FileSystemwatcher isse 9 47
I need help adding validation to my MVC.Net view 6 23
Error building VS2105 solution from repository 1 38
VB.net/VSTO Excel Add-in 2 19
IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 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