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 42: using (dbsitisixorEntities1 db = new dbsitisixorEntities1()) Line 43: { Line 44: t_pages temppages = db.t_pages.Where(p => p.pag_ref_gamma_prod == n_prod.MARCHIO && p.pag_language == culture).First(); Line 45: slug_gamma = temppages.pag_slug + "-" + temppages.pag_id; Line 46: temppages = db.t_pages.Where(p => p.pag_ref_catalogo == n_prod.CATALOGO && p.pag_language == culture).First(); Source File: \\wagner\wwwroot$\05365fc90.hostnd\htdocs\www\Views\projectipae\Page\ProductsNews.cshtml Line: 44 Stack Trace: [InvalidOperationException: Sequence contains no elements] System.Linq.Enumerable.First(IEnumerable`1 source) +264 System.Data.Objects.ELinq.<>c__11`1.<GetElementFunction>b__11_0(IEnumerable`1 sequence) +41 System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle(IEnumerable`1 query, Expression queryRoot) +59 System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) +128 System.Data.Entity.Internal.Linq.DbQueryProvider.Execute(Expression expression) +60 System.Linq.Queryable.First(IQueryable`1 source) +211 ASP._Page_Views_projectipae_Page_ProductsNews_cshtml.Execute() in \\wagner\wwwroot$\05365fc90.hostnd\htdocs\www\Views\projectipae\Page\ProductsNews.cshtml:44 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +196 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +88 System.Web.WebPages.StartPage.RunPage() +19 System.Web.WebPages.StartPage.ExecutePageHierarchy() +62 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +76 System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +221 System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +291 System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13 System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +23 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +245 System.Web.Mvc.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() +22 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +176 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +311 System.Web.Mvc.Controller.ExecuteCore() +105 System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +87 System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10 System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +34 System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +16 System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +10 System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50 System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +28 System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7 System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +23 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +59 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9873933 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +159 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3770.0