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 38:            
Line 39:             Dim contentSAPA As New ccontent
Line 40:             contentSAPA = ccontentlist.getcategorycontents(oSM_SAPA, "localizar").values.Where(Function(p) p.getfieldvalue("contentname") = idcontent).first
Line 41:             
Line 42: 

Source File: D:\_SITES\janelasapa.com - www\sm\modules\content.aspx.vb    Line: 40

Stack Trace:


[InvalidOperationException: Sequence contains no elements]
   System.Linq.Enumerable.First(IEnumerable`1 source) +402
   _sm_modules_content.Page_Load(Object sender, EventArgs e) in D:\_SITES\janelasapa.com - www\sm\modules\content.aspx.vb:40
   System.Web.UI.Control.OnLoad(EventArgs e) +79
   System.Web.UI.Control.LoadRecursive() +130
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2852


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