Index was outside the bounds of the array.

Server Error in '/' 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.IndexOutOfRangeException: Index was outside the bounds of the array.

Source Error:


Line 16:         get
Line 17:         {
Line 18:             return FrontOfficeLib.Data.FODataManager.GetSubCategoriesByParentPath("/");
Line 19:         }
Line 20:     }

Source File: c:\WebSite\controls\Header.ascx    Line: 18

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   System.Collections.Generic.Enumerator.MoveNext() +112
   System.Linq.WhereListIterator`1.MoveNext() +223
   System.Linq.Buffer`1..ctor(IEnumerable`1 source) +520
   System.Linq.<GetEnumerator>d__0.MoveNext() +145
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +536
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +80
   FrontOfficeLib.Data.FODataManager.GetSubCategoriesByParentPath(String path) in c:\VSProjects\Aldido\FrontOfficeLib\Data\FODataManager.cs:291
   ASP.controls_header_ascx.get_ParentByPath() in c:\WebSite\controls\Header.ascx:18
   ASP.controls_header_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\WebSite\controls\Header.ascx:123
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
   FrontOfficeLib.UI.UIRenderer.RenderForDisplay(Page p) in c:\VSProjects\Aldido\FrontOfficeLib\UI\UIRenderer.cs:41
   FrontOffice.FrontOffice.get_RenderedBody() in c:\WebSite\FrontOffice.aspx:60
   FrontOffice.FrontOffice.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\WebSite\FrontOffice.aspx:93
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131
   System.Web.UI.Page.Render(HtmlTextWriter writer) +40
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5363


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34237