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 23: 
Line 24:         Dim qryItem = From item In xeDocument...<node> Where item.@id = intStructureID Select item
Line 25:         intTemplateID = qryItem.First.@template
Line 26:         strTitle = qryItem.First.@title
Line 27:         strDescription = Regex.Replace(qryItem.First.@description, "<(.|\n)*?>", String.Empty)

Source File: G:\PleskVhosts\cavanweb.ie\cavanweb\publish\domain\cavanarts\Default.aspx.vb    Line: 25

Stack Trace:


[InvalidOperationException: Sequence contains no elements]
   System.Linq.Enumerable.First(IEnumerable`1 source) +417
   publish_domain_marblearchcavesglobalgeopark_Default.Page_PreInit(Object sender, EventArgs e) in G:\PleskVhosts\cavanweb.ie\cavanweb\publish\domain\cavanarts\Default.aspx.vb:25
   System.Web.UI.Page.OnPreInit(EventArgs e) +11692592
   System.Web.UI.Page.PerformPreInit() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +335


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