Server Error in '/' Application.

Value cannot be null.
Parameter name: source

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.ArgumentNullException: Value cannot be null.
Parameter name: source

Source Error:


Line 10: </script>
Line 11: 
Line 12: @Component.Invoke("SearchResult", new { searchModel = Model.SearchModel })

Source File: D:\web\summitweek\src\Danski.Website\Views\SearchResultPage.cshtml    Line: 12

Stack Trace:


[ArgumentNullException: Value cannot be null.
Parameter name: source]
   System.Linq.Enumerable.Where(IEnumerable`1 source, Func`2 predicate) +643
   Danski.Services.PensionService.GetPensionTypesFromEnums(Int32 brandId) +363
   Danski.Website.ViewComponents.Search.<InvokeAsync>d__4.MoveNext() +1115
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +60
   DisPlay.Umbraco.Web.Mvc.ViewComponents.<InvokeAsyncCore>d__4.MoveNext() in D:\git\umbraco-baseline\src\DisPlay.UmbracoBaseline.Core\Web\Mvc\ViewComponents\DefaultViewComponentInvoker.cs:63
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +60
   DisPlay.Umbraco.Web.Mvc.ViewComponents.<InvokeAsync>d__3.MoveNext() in D:\git\umbraco-baseline\src\DisPlay.UmbracoBaseline.Core\Web\Mvc\ViewComponents\DefaultViewComponentInvoker.cs:42
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +60
   DisPlay.Umbraco.Tasks.<<RunSync>b__0>d.MoveNext() in D:\git\umbraco-baseline\src\DisPlay.UmbracoBaseline.Core\Tasks\AsyncHelpers.cs:31

[AggregateException: One or more errors occurred.]
   DisPlay.Umbraco.Tasks.ExclusiveSynchronizationContext.BeginMessageLoop() in D:\git\umbraco-baseline\src\DisPlay.UmbracoBaseline.Core\Tasks\AsyncHelpers.cs:123
   DisPlay.Umbraco.Tasks.AsyncHelpers.RunSync(Func`1 task) in D:\git\umbraco-baseline\src\DisPlay.UmbracoBaseline.Core\Tasks\AsyncHelpers.cs:38
   DisPlay.Umbraco.Web.Mvc.ViewComponents.DefaultViewComponentHelper.InvokeCore(ViewComponentDescriptor descriptor, Object arguments) in D:\git\umbraco-baseline\src\DisPlay.UmbracoBaseline.Core\Web\Mvc\ViewComponents\DefaultViewComponentHelper.cs:86
   ASP._Page_Views_SearchResultPage_cshtml.Execute() in D:\web\summitweek\src\Danski.Website\Views\SearchResultPage.cshtml:12
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +86
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107
   Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +194
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +375
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +88
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +188
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +39
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +43
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +648
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +213
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +131


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