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 38:             breadcrumbsResults = proConnect.proBreadcrumbs(int.Parse(Request["Id"])).ToList();
Line 39: 
Line 40:             pro_Category = breadcrumbsResults.Single(n => n.Id == int.Parse(Request["Id"]));
Line 41:             categoryResults = proConnect.proGetChildLevelCategory(pro_Category.Id, pro_Category.Name, pro_Category.NameUrl).ToList();
Line 42:             //pro_Category.ViewCount += 1;

Source File: c:\webspace\dongagroup.vn\httpdocs\danhmuc\category.aspx.cs    Line: 40

Stack Trace:


[InvalidOperationException: Sequence contains no matching element]
   System.Linq.Enumerable.Single(IEnumerable`1 source, Func`2 predicate) +488
   danhmuc_category.Page_Load(Object sender, EventArgs e) in c:\webspace\dongagroup.vn\httpdocs\danhmuc\category.aspx.cs:40
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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