Server Error in '/' Application.

Sequence contains no elements

Description: An unhandled exception occurred.

Exception Details: System.InvalidOperationException: Sequence contains no elements

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[InvalidOperationException: Sequence contains no elements]
   System.Linq.Enumerable.First(IEnumerable`1 source) +417
   HoraceMann.PublicSite.Business.Providers.AgentContentProvider.GetAgentOffices(Item item, List`1 agentNumbers, String primaryAgentNumber) in E:\ADOAgents\1\_work\324\s\Source\HoraceMann.PublicSite.Business\Providers\AgentContentProvider.cs:174
   HoraceMann.PublicSite.Business.Providers.AgentContentProvider.BuildAgentContent(Item item, List`1 agentNumbers, String primaryAgentNumber) in E:\ADOAgents\1\_work\324\s\Source\HoraceMann.PublicSite.Business\Providers\AgentContentProvider.cs:43
   HoraceMann.Areas.AgentWebPages.Controllers.AgentWebPageController.GetHomepageModel(Item item) in E:\ADOAgents\1\_work\324\s\Source\HoraceMann.PublicSite.WebApplication\Areas\AgentWebPages\Controllers\AgentWebPageController.cs:143
   HoraceMann.Areas.AgentWebPages.Controllers.AgentWebPageController.SplitLayout() in E:\ADOAgents\1\_work\324\s\Source\HoraceMann.PublicSite.WebApplication\Areas\AgentWebPages\Controllers\AgentWebPageController.cs:34
   lambda_method(Closure , ControllerBase , Object[] ) +87
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +280
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.<>c__DisplayClass13.<InvokeActionMethodWithFilters>b__10() +80
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +466
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +466
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +324