out of bounds of array error App_Code class

Discussion in 'ASP.NET 2.0' started by lucy, Feb 5, 2008.

  1. I have a problem with an asp.net application that uses sql2005 database. Two pages in the application
    use classes writen in the App_Code folder. These classes essentially pull a bunch of data
    to be used by the page. Both pages using the App_Code folder went down yesterday with an index
    out bounds of the Array error. What is troubling is that I can not reproduce the error on my local visual
    studio environment. I have copied the sql data base back into the local envirnoment and can not reproduce the error. These pages have been up and running for months.
    Any ideas
    Thanks
     
  2. Thank you. I understand out of bounds errors. My confusion is the erratic nature of this error. The application works without this error on my local server (visual studio). The problem appears and disappears. Is it possible that I have not deployed the application from visual studio. I manually copied the custom class in question from notepad to the app_code folder. Does the app_code folder have to be activated? OK sorry for the rather elementary nature of these questions





    thanks
     
  3. I don't think this has anything to do with the app_code folder or its contents,since you are able to use that class within your pages(there is no such thing called activation).
    Are you connecting to the same database when running the application locally and remotely?once again,I believe your page is not able to handle the special case when data is returned as unexpected or less than expected.Can you post the snippet of your code,where in you pull data and iterate thru it?

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  4. 'out bounds of the Array error' is a application specific error.
    Somewhere in your code,you are trying to iterate thru an array more than its actual content length .You should check for points in your code,where you are looping thru an array or something and then try and accommodate the varying size(special cases) of the array accordingly.

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page