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 16:         {
Line 17:             List<Haberler> haber = islem.Haberlerislem.HaberbyIdRetKatAdi(id);
Line 18:             return extools.ReWriterPath(haber[0].Haberid.ToString(), haber[0].Haberkategoriid.ToString(), haber[0].Haberbaslik, haber[0].Haberkategoriadi, "detaylar");
Line 19:         }
Line 20:         else

Source File: c:\inetpub\vhosts\ahmetli.bel.tr\httpdocs\UserControls\anasayfa-banner.ascx.cs    Line: 18

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) +77
   System.Collections.Generic.List`1.get_Item(Int32 index) +14614692
   UserControls_anasayfa_banner.LinkDon(String id) in c:\inetpub\vhosts\ahmetli.bel.tr\httpdocs\UserControls\anasayfa-banner.ascx.cs:18
   ASP.usercontrols_anasayfa_banner_ascx.__DataBind__control3(Object sender, EventArgs e) in c:\inetpub\vhosts\ahmetli.bel.tr\httpdocs\UserControls\anasayfa-banner.ascx:8
   System.Web.UI.Control.OnDataBinding(EventArgs e) +100
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +178
   System.Web.UI.Control.DataBindChildren() +248
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +195
   System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +174
   System.Web.UI.WebControls.Repeater.AddDataItemsIntoItemsArray(IEnumerable dataSource, Boolean useDataSource) +291
   System.Web.UI.WebControls.Repeater.PostGetDataAction(IEnumerable dataSource) +109
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +81
   UserControls_anasayfa_banner.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\ahmetli.bel.tr\httpdocs\UserControls\anasayfa-banner.ascx.cs:10
   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.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1602


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