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 171:                                 resim = E.kategori_resim
Line 172:                             }).ToList();
Line 173:            chapter.Attributes.Add("style", "background:url(../webkontrol/kategori_yonetimi/kategoriresim/" + chapsorgu[0].resim + ") no-repeat center top;");
Line 174:            Rpturun.DataSource = sorgu;
Line 175:            Rpturun.DataBind();

Source File: c:\vhosts\alezamed.com\http\Urunler\Urundetay.aspx.cs    Line: 173

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) +64
   System.Collections.Generic.List`1.get_Item(Int32 index) +12733088
   Urunler_Urundetay.UrunDetayGetir() in c:\vhosts\alezamed.com\http\Urunler\Urundetay.aspx.cs:173
   Urunler_Urundetay.Page_Load(Object sender, EventArgs e) in c:\vhosts\alezamed.com\http\Urunler\Urundetay.aspx.cs:20
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


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