gpt4 book ai didi

asp.net - '/' 应用程序中的服务器错误 - 已添加具有相同 key 的项目

转载 作者:行者123 更新时间:2023-12-04 14:48:20 26 4
gpt4 key购买 nike

我在页面加载时收到此错误。并非总是如此,当我点击刷新按钮时,错误就解决了。

已添加具有相同键的项目。

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.ArgumentException: An item with the same key has already been added.

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:


[ArgumentException: An item with the same key has already been added.]
System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +52
System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)+9381419
AjaxControlToolkit.ToolkitScriptManagerHelper.GetAssembly(String name) +52 AjaxControlToolkit.ToolkitScriptManagerCombiner.IsScriptCombinable(ScriptEntry scriptEntry, Boolean enableCdn) +27
AjaxControlToolkit.ToolkitScriptManagerCombiner.WriteScripts(List`1 scriptEntries, TextWriter outputWriter, Boolean enableCdn) + 122 AjaxControlToolkit.ToolkitScriptManagerCombiner.GetCombinedRegisteredScriptContent(Boolean enableCdn) +206
AjaxControlToolkit.ToolkitScriptManagerCombiner.GetCombinedScriptContentHash(HttpContextBase context, String[] bundles, Boolean enableCdn) +18

AjaxControlToolkit.ToolkitScriptManager.LoadScriptReferences(HttpContextBase context, String[] bundles, Boolean forCombineAndMinify) +135

AjaxControlToolkit.ToolkitScriptManager.OnLoad(EventArgs e) +215
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

最佳答案

基本错误表明两个对象被添加到具有相同键的同一个字典中,现在允许这样做。

额外的堆栈跟踪让我相信您正在向 ToolkitScriptManagerCombiner 添加两个同名的控件。

更新

看起来这可能是最近的一个bug

http://ajaxcontroltoolkit.codeplex.com/workitem/27684

https://bugnet.codeplex.com/discussions/542489

使用旧版本的 AjaxControlToolkit 可能会帮助您继续前进,直到问题得到解决。

关于asp.net - '/' 应用程序中的服务器错误 - 已添加具有相同 key 的项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23400094/

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