Server Error in '/' Application.

Sequence contains no matching element

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 matching element

Source Error:


Line 101:		if (!string.IsNullOrWhiteSpace(keyword))
Line 102:		{
Line 103:			var commentData = obj.Pages.First(x => x.Keyword.ToLower().Replace(" ", "-") == keyword);
Line 104:			
Line 105:			if (commentData != null)

Source File: C:\WEB-SITES\RoboNew\ceo\PageBuilder.ashx    Line: 103

Stack Trace:


[InvalidOperationException: Sequence contains no matching element]
   System.Linq.Enumerable.First(IEnumerable`1 source, Func`2 predicate) +436
   PageBuilder.GetKeywords(String keyword, String baseUrl, Comments obj) in C:\WEB-SITES\RoboNew\ceo\PageBuilder.ashx:103
   PageBuilder.MixData(String keyword, String baseUrl) in C:\WEB-SITES\RoboNew\ceo\PageBuilder.ashx:171
   PageBuilder.ProcessRequest(HttpContext context) in C:\WEB-SITES\RoboNew\ceo\PageBuilder.ashx:45
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +866
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +213
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +91


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