Server Error in '/' Application.

Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.

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.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.

Source Error:


Line 93:             UIPager pager = UIPager.CreateInstance(information.Count(), pgno, concatStr);
Line 94:             UIPagingBox1.CreatePaging(pager);
Line 95:             var pagedRecords = information.GetRange(pager.StartIndex, pager.RecordsCountPerPage);
Line 96:             GalleryList.DataSource = pagedRecords;
Line 97:             GalleryList.DataBind();

Source File: d:\vhost\serc.ae\httpdocs\en\info.aspx.cs    Line: 95

Stack Trace:


[ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.]
   System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +60
   System.Collections.Generic.List`1.GetRange(Int32 index, Int32 count) +14625693
   en_info.BindGallery(Int32 infoId) in d:\vhost\serc.ae\httpdocs\en\info.aspx.cs:95
   en_info.Page_Load(Object sender, EventArgs e) in d:\vhost\serc.ae\httpdocs\en\info.aspx.cs:34
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   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