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 36:                 List<Tuple<object, object>> parametersList = new List<Tuple<object, object>>();
Line 37:                 parametersList.Add(new Tuple<object, object>("@seoLink", path));
Line 38:                 DataTable dt = SqlDataBind.GetTableByText(string.Format(breadcrumbQuery, tableNames[index]), parametersList);
Line 39: 
Line 40:                 if (dt != null && dt.Rows.Count > 0)

Source File: C:\inetpub\wwwroot\Hafele\combined-hafeleappliances.com\App_Code\Navigation.cs    Line: 38

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   Navigation.GetBreadcrumbItems(String pageUrl, String breadcrumbQuery, String[] tableNames, String fieldName, Boolean useReducePaths) in C:\inetpub\wwwroot\Hafele\combined-hafeleappliances.com\App_Code\Navigation.cs:38
   Schema.GenerateBreadcrumbSchema(String pageUrl, String breadcrumbQuery, String[] tables, String fieldName, Boolean useReducePaths) in C:\inetpub\wwwroot\Hafele\combined-hafeleappliances.com\App_Code\Schema.cs:11
   Ideate.Hafele.Nagold.Web.ProductCategory.PopulateBreadcrumbAndSchema() in C:\inetpub\wwwroot\Hafele\combined-hafeleappliances.com\ProductCategory.aspx.cs:306
   Ideate.Hafele.Nagold.Web.ProductCategory.Page_Load(Object sender, EventArgs e) in C:\inetpub\wwwroot\Hafele\combined-hafeleappliances.com\ProductCategory.aspx.cs:106
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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