title: Collection was modified; enumeration operation may not execute
body: <p>we've been getting this error lately and have no idea why, we are not modifying any collection, we even removed most foreach on the pages that we were getting the error. Here is the stacktrace of the error:</p>
  
  <pre><code>   Exception type: InvalidOperationException 
      Exception message: Collection was modified; enumeration operation may not execute.
     en System.Collections.Generic.List`1.Enumerator.MoveNextRare()
     en System.Linq.Enumerable.WhereListIterator`1.MoveNext()
     en System.Linq.Enumerable.&lt;SelectManyIterator&gt;d__14`2.MoveNext()
     en System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
     en System.Linq.Enumerable.&lt;SelectManyIterator&gt;d__14`2.MoveNext()
     en System.Linq.Buffer`1..ctor(IEnumerable`1 source)
     en System.Linq.OrderedEnumerable`1.&lt;GetEnumerator&gt;d__0.MoveNext()
     en System.Linq.Buffer`1..ctor(IEnumerable`1 source)
     en System.Linq.Enumerable.&lt;ReverseIterator&gt;d__a0`1.MoveNext()
     en System.Web.Mvc.FilterProviderCollection.&lt;RemoveDuplicates&gt;d__b.MoveNext()
     en System.Linq.Buffer`1..ctor(IEnumerable`1 source)
     en System.Linq.Enumerable.&lt;ReverseIterator&gt;d__a0`1.MoveNext()
     en System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
     en System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
     en System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
     en System.Web.Mvc.FilterInfo..ctor(IEnumerable`1 filters)
     en System.Web.Mvc.ControllerActionInvoker.GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor)
     en System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
     en System.Web.Mvc.Controller.ExecuteCore()
     en System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
     en System.Web.Mvc.MvcHandler.&lt;&gt;c__DisplayClass6.&lt;&gt;c__DisplayClassb.&lt;BeginProcessRequest&gt;b__5()
     en System.Web.Mvc.Async.AsyncResultWrapper.&lt;&gt;c__DisplayClass1.&lt;MakeVoidDelegate&gt;b__0()
     en System.Web.Mvc.MvcHandler.&lt;&gt;c__DisplayClasse.&lt;EndProcessRequest&gt;b__d()
     en System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
     en System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)
  </code></pre>
  
  <p>Any help is appreciated.</p>