System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at AjaxControlToolkit.ToolkitScriptManagerHelper.GetAssembly(String name)
at AjaxControlToolkit.ToolkitScriptManagerCombiner.IsScriptCombinable(ScriptEntry scriptEntry, Boolean enableCdn)
at AjaxControlToolkit.ToolkitScriptManagerCombiner.WriteScripts(List`1 scriptEntries, TextWriter outputWriter, Boolean enableCdn)
at AjaxControlToolkit.ToolkitScriptManagerCombiner.GetCombinedRegisteredScriptContent(Boolean enableCdn)
at AjaxControlToolkit.ToolkitScriptManagerCombiner.GetCombinedScriptContentHash(HttpContextBase context, String[] bundles, Boolean enableCdn)
at AjaxControlToolkit.ToolkitScriptManager.LoadScriptReferences(HttpContextBase context, String[] bundles, Boolean forCombineAndMinify)
at AjaxControlToolkit.ToolkitScriptManager.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
I'm thinking there should be a lock used in the following function in AjaxControlToolkit.ToolkitScriptManagerHelper.
```
internal static Assembly GetAssembly(string name) {
if (!LoadedAssemblies.ContainsKey(name))
LoadedAssemblies.Add(name, Assembly.Load(name));
return LoadedAssemblies[name];
}
```
Comments: I also have an application experiencing this issue.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at AjaxControlToolkit.ToolkitScriptManagerHelper.GetAssembly(String name)
at AjaxControlToolkit.ToolkitScriptManagerCombiner.IsScriptCombinable(ScriptEntry scriptEntry, Boolean enableCdn)
at AjaxControlToolkit.ToolkitScriptManagerCombiner.WriteScripts(List`1 scriptEntries, TextWriter outputWriter, Boolean enableCdn)
at AjaxControlToolkit.ToolkitScriptManagerCombiner.GetCombinedRegisteredScriptContent(Boolean enableCdn)
at AjaxControlToolkit.ToolkitScriptManagerCombiner.GetCombinedScriptContentHash(HttpContextBase context, String[] bundles, Boolean enableCdn)
at AjaxControlToolkit.ToolkitScriptManager.LoadScriptReferences(HttpContextBase context, String[] bundles, Boolean forCombineAndMinify)
at AjaxControlToolkit.ToolkitScriptManager.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
I'm thinking there should be a lock used in the following function in AjaxControlToolkit.ToolkitScriptManagerHelper.
```
internal static Assembly GetAssembly(string name) {
if (!LoadedAssemblies.ContainsKey(name))
LoadedAssemblies.Add(name, Assembly.Load(name));
return LoadedAssemblies[name];
}
```
Comments: I also have an application experiencing this issue.