gpt4 book ai didi

Ninject 运行时异常频繁发生 - System.InvalidOperationException : Collection was modified; enumeration operation may not execute

转载 作者:行者123 更新时间:2023-12-02 02:25:48 25 4
gpt4 key购买 nike

我在网络表单应用程序中使用 Ninject 2.2.1.0 和 Ninject.Web 2.2.0.0。

我每天都会收到以下错误报告...

System.InvalidOperationException: Collection was modified; enumeration

operation may not execute. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.List1.Enumerator.MoveNextRare()
at System.Collections.Generic.List
1.Enumerator.MoveNext() at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext()
at Ninject.Infrastructure.Language.ExtensionsForIEnumerableOfT.Map[T](IEnumerable
1 series, Action`1 action) in c:\Projects\Ninject\ninject\src\Ninject\Infrastructure\Language\ExtensionsForIEnumerableOfT.cs:line 22 at Ninject.OnePerRequestModule.DeactivateInstancesForCurrentHttpRequest() in c:\Projects\Ninject\ninject\src\Ninject\OnePerRequestModule.cs:line 63 at Ninject.OnePerRequestModule.b__0(Object o, EventArgs e) in c:\Projects\Ninject\ninject\src\Ninject\OnePerRequestModule.cs:line 36 at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

似乎是在高峰时段发生的。是否有带有此补丁的稳定版本?

最佳答案

内核实例的创建目前不是线程安全的。这可能会在 2.4 中改变

关于Ninject 运行时异常频繁发生 - System.InvalidOperationException : Collection was modified; enumeration operation may not execute,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6028564/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com