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 511:                               select a;
Line 512:
Line 513:            article = GetArticleFromArticleDetails(art.ToList()[0]);
Line 514:            BaseArticle.CacheData(key, article);
Line 515:         }

Source File: d:\WebData\barameegroup.com\App_Code\BLL\Articles\Article.cs    Line: 513

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() +78
   System.Collections.Generic.List`1.get_Item(Int32 index) +53
   MB.TheBeerHouse.BLL.Articles.Article.GetArticleByID(Int32 articleID) in d:\WebData\barameegroup.com\App_Code\BLL\Articles\Article.cs:513
   MB.TheBeerHouse.UI.ShowArticle.Page_Load(Object sender, EventArgs e) in d:\WebData\barameegroup.com\ShowArticle.aspx.cs:45
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   MB.TheBeerHouse.UI.BasePage.OnLoad(EventArgs e) in d:\WebData\barameegroup.com\App_Code\BasePage.cs:62
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.8964; ASP.NET Version:2.0.50727.8962