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 34:             lvUnitsSpecialOffers.DataSource = projectSpecialOffersCollection;
Line 35: 
Line 36:             locHotOffersTitle.Text = string.Format("{0}: {1}",
Line 37:                 GetGlobalResourceObject("Common", "HotOffers").ToString(),
Line 38:                 GetLocalizedField(projectSpecialOffersCollection.First().Units.Projects.LocalizedProjects, "Title")

Source File: d:\inetpub\vhosts\forfree-3904.package\forfreeco.com\wwwroot\hot-offers.aspx.cs    Line: 36

Stack Trace:


[InvalidOperationException: Sequence contains no elements]
   System.Linq.Enumerable.First(IEnumerable`1 source) +454
   units.Page_Load(Object sender, EventArgs e) in d:\inetpub\vhosts\forfree-3904.package\forfreeco.com\wwwroot\hot-offers.aspx.cs:36
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   PageBase.OnLoad(EventArgs e) in d:\inetpub\vhosts\forfree-3904.package\forfreeco.com\wwwroot\App_Code\PageBase.cs:154
   System.Web.UI.Control.LoadRecursive() +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4082


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