Server Error in '/' Application.

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

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.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Source Error:


Line 281:                {
Line 282:                    rptItems.DataSource = oPDS;
Line 283:                    rptItems.DataBind();
Line 284:                }
Line 285:            }

Source File: e:\inetpub\USDAW-LIVE-20220519-1110\CMSWebParts\USDAW\PublicationsListing.ascx.cs    Line: 283

Stack Trace:


[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) +145
   System.Collections.Generic.List`1.System.Collections.IList.get_Item(Int32 index) +47
   System.Web.UI.WebControls.Repeater.AddDataItemsIntoItemsArray(IEnumerable dataSource, Boolean useDataSource) +210
   System.Web.UI.WebControls.Repeater.PostGetDataAction(IEnumerable dataSource) +119
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +80
   CMSWebParts_USDAW_PublicationsListing.Page_Load(Object sender, EventArgs e) in e:\inetpub\USDAW-LIVE-20220519-1110\CMSWebParts\USDAW\PublicationsListing.ascx.cs:283
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   CMS.ExtendedControls.AbstractUserControl.OnLoad(EventArgs e) +73
   CMS.PortalControls.CMSAbstractWebPart.OnLoad(EventArgs e) +211
   System.Web.UI.Control.LoadRecursive() +112
   System.Web.UI.Control.LoadRecursive() +196
   System.Web.UI.Control.LoadRecursive() +196
   System.Web.UI.Control.LoadRecursive() +196
   System.Web.UI.Control.LoadRecursive() +196
   System.Web.UI.Control.LoadRecursive() +196
   System.Web.UI.Control.LoadRecursive() +196
   System.Web.UI.Control.LoadRecursive() +196
   System.Web.UI.Control.LoadRecursive() +196
   System.Web.UI.Control.LoadRecursive() +196
   System.Web.UI.Control.LoadRecursive() +196
   System.Web.UI.Control.LoadRecursive() +196
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4082


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