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 26:         {
Line 27:             string cultureAlias = UmbracoUtils.Tools.GetCultureAlias(language.Id);
Line 28:             dtLanguages.Rows.Add(UmbracoUtils.Tools.GetCultureAlias() == cultureAlias ? "selected " : "",
Line 29:                                 UmbracoUtils.Tools.GetThisPageInAnotherLanguage(cultureAlias),
Line 30:                                 language.GetPropertyValue("languageName"));

Source File: d:\webhome\goldenerose.it\www\usercontrols\default\Languages.ascx.cs    Line: 28

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   UmbracoUtils.Tools.GetThisPageInAnotherLanguage(String languageCode) +5885
   usercontrols_Languages.PopulateLanguages() in d:\webhome\goldenerose.it\www\usercontrols\default\Languages.ascx.cs:28
   usercontrols_Languages.Page_Load(Object sender, EventArgs e) in d:\webhome\goldenerose.it\www\usercontrols\default\Languages.ascx.cs:17
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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