Server Error in '/_layouts/incident'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zazza10
    New Member
    • Apr 2010
    • 3

    #1

    Server Error in '/_layouts/incident'

    I have a problem with my site created with Share Point Portal.
    This morning I launched a specific link I came out this error:

    Index was outside the bounds of the array.Server Error in '/_layouts/incident'
    Application.

    Index was outside the bounds of the array.
    Description: An unhandled exception occurred during the execution of the current
    web request. Please review the stack trace for more information about the error
    and where it originated in the code.

    Exception Details: System.IndexOut OfRangeExceptio n: Index was outside the bounds
    of the array.

    Source Error:

    An unhandled exception was generated during the execution of the current
    web request. Information regarding the origin and location of the
    exception can be identified using the exception stack trace below.

    Stack Trace:

    [IndexOutOfRange Exception: Index was outside the bounds of the array.]
    Incident.Action Response..ctor( SPListItem item) +290
    Incident.Action ResponseCollect ion..ctor(SPWeb web) +96
    Incident.Incide nt.Page_Load(Ob ject sender, EventArgs e) +1089
    System.Web.UI.C ontrol.OnLoad(E ventArgs e) +67
    System.Web.UI.C ontrol.LoadRecu rsive() +35
    System.Web.UI.P age.ProcessRequ estMain() +731

    Version Information: Microsoft .NET Framework Version:1.1.432 2.573; ASP.NET
    Version:1.1.432 2.573
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Well when you see an error stating that you are attempting to reference an element at a index outside of the bounds of the array then that's probably what's happening.

    Check to make sure that the index of the element that you are attempting to access is between 0 and the Length -1 of the array as long as the array has 1 or more elements in it.

    See line 290 in your code...because the error message is stating that you are having problems on line 290.

    -Frinny

    Comment

    • Zazza10
      New Member
      • Apr 2010
      • 3

      #3
      Thanks Frinny,

      but how do I control the line wrong?

      And sorry for my english :-)

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        You need to open the project that created the website and look at that line :)

        Comment

        • Zazza10
          New Member
          • Apr 2010
          • 3

          #5
          Mh!!!!
          Do you think that is a problem in SQL?

          The site was created with SharePoint and MSDE


          Sorry but I controlalre the web.config of the project?

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            The problem is that you're trying to access something that doesn't exist.
            Say you have an Array of elements that looks like this:
            Code:
            Index  |0|1|2|3|
            Element|a|b|c|d|
            Normally, if you wanted to get "b" you would access the Array at Index 1 like this:
            (vb.net)
            Code:
            myArray(1)
            (c#)
            Code:
            myArray[1];
            But what happens if your array is actually nothing?
            It has no elements in this case.
            So when you try to access the element at array index 1 you get an error stating that you are trying to access an element that is not within the "bounds" of the array....just like the one you're seeing.

            So the error might be caused if you created your Array based on values returned from the database...and there was nothing returned by your query string...and you tried to use the Array without checking to see if contained anything.

            Or it might not have anything to do with the database at all.

            Typically when you retrieve data from a database it's in a DataTable...and unless you take steps to convert it into an array...I don't see how the two would be related.

            So I'm inclined to say that, No this doesn't have anything to do with your database...but I could be wrong because I can't see the code.

            -Frinny

            Comment

            Working...