Server Error in '/' Application.

There is no row at position 0.

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: There is no row at position 0.

Source Error:


Line 12:     {
Line 13:         DB.Current.HeadlineList(false, out DS, AppSettings.Current.SystemKey, TheGuid, true, null);
Line 14:         ContentMemberOnly = DS.Tables[0].Rows[0].Field<bool?>("IsMemberOnly") ?? false;
Line 15:         if (ContentMemberOnly)
Line 16:         {

Source File: c:\home\site\wwwroot\headlines.cshtml    Line: 14

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +2140712
   System.Data.DataRowCollection.get_Item(Int32 index) +22
   ASP._Page_headlines_cshtml.Execute() in c:\home\site\wwwroot\headlines.cshtml:14
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +198
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +69
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +114
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +116


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