Server Error in '/' Application.

Collection was modified after the enumerator was instantiated.

Description: An unhandled exception occurred.

Exception Details: System.InvalidOperationException: Collection was modified after the enumerator was instantiated.

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: Collection was modified after the enumerator was instantiated.]
   System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) +60
   System.Collections.Generic.SortedListValueEnumerator.MoveNext() +113
   System.Linq.WhereEnumerableIterator`1.MoveNext() +255
   System.Linq.Enumerable.Count(IEnumerable`1 source) +303
   Headbrands.Cache.Services.UrlService.GetUrlBySysId(Int32 id, String language, String siteName) in D:\a\1\s\Headbrands.Cache\Services\UrlService.cs:0
   Headbrands.Assortment.Services.UrlService.GetUrlBySysId(Int32 id, String language, String siteName) in D:\a\1\s\Headbrands.Assortment\Services\UrlService.cs:38
   Headbrands.Site.Webshop.Services.NavigationService.GetMainMenu(String siteName) in D:\a\1\s\Headbrands.Site.Webshop\Services\NavigationService.cs:51
   Headbrands.Site.Webshop.Controllers.Navigation.MainMenuController.Mobile() in D:\a\1\s\Headbrands.Site.Webshop\Controllers\Navigation\MainMenuController.cs:18
   lambda_method(Closure , ControllerBase , Object[] ) +87
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.<>c__DisplayClass24_0.<InvokeActionMethodWithFilters>b__0() +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) +3205


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