Server Error in '/' Application.

Sequence contains no elements

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.InvalidOperationException: Sequence contains no elements

Source Error:


Line 117:                                        <div class="wrapper">
Line 118:                                            <div class="image">
Line 119:                                                <asp:Image ID="imgProductImage" runat="server" ImageUrl='<%# Eval("DefaultProductImageUrl") %>' onError="this.onerror=null;this.src='../assets/img/no-image.png';" />
Line 120:                                            </div>
Line 121:

Source File: d:\inetpub\wwwroot\nutritionempire.net\site\products.aspx    Line: 119

Stack Trace:


[InvalidOperationException: Sequence contains no elements]
   System.Linq.Enumerable.First(IEnumerable`1 source) +405
   Think.Commerce.Entities.Product.get_DefaultProductImageUrl() +685

[TargetInvocationException: Property accessor 'DefaultProductImageUrl' on object 'Think.Commerce.Entities.Product' threw the following exception:'Sequence contains no elements']
   System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +490
   System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) +104
   System.Web.UI.DataBinder.Eval(Object container, String[] expressionParts) +92
   ASP.products_aspx.__DataBinding__control5(Object sender, EventArgs e) in d:\inetpub\wwwroot\nutritionempire.net\site\products.aspx:119
   System.Web.UI.Control.OnDataBinding(EventArgs e) +98
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +174
   System.Web.UI.Control.DataBindChildren() +246
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +191
   System.Web.UI.WebControls.ListView.CreateItemsWithoutGroups(ListViewPagedDataSource dataSource, Boolean dataBinding, InsertItemPosition insertPosition, ArrayList keyArray) +1122
   System.Web.UI.WebControls.ListView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +1248
   System.Web.UI.WebControls.ListView.PerformDataBinding(IEnumerable data) +53
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +165
   System.Web.UI.WebControls.ListView.PerformSelect() +125
   WebApplication.products.LoadProducts(Int32 pageIndex) +542
   WebApplication.products.Page_Load(Object sender, EventArgs e) +30
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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