我正在开发一个使用AjaxControlkit 3.0.30512.20315的ASP.NET Web应用程序。我的主页上有一个ToolkitScriptManager
实例,CombineScripts
集合中有ScriptReferences
。 如果我的iisreset
访问后,从2个differenct客户我的默认页,我得到下面的异常ToolkitScriptManager第一次在并发访问页面期间抛出NullReferenceException
[NullReferenceException: Object Reference not set to an instance of an object.]
System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +143
System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value) +11
AjaxControlToolkit.ToolkitScriptManager.GetScriptCombineAttributes(Assembly assembly) +129
AjaxControlToolkit.ToolkitScriptManager.IsScriptCombinable(ScriptEntry scriptEntry) +148
AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference(ScriptReferenceEventArgs e) +415
System.Web.UI.ScriptManager.RegisterScripts() +191
System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +113
System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +8698462
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1029
使用.NET Reflector
我发现了GetScriptCombineAttributes
方法访问static dictionary
,这是not protected against concurrent access
。 要么我在我的代码中有竞争条件,要么在AjaxToolkit
中有一个错误。
有人可以给我一个暗示吗?
在此先感谢
你有没有遇到过这种情况? – ilivewithian 2010-11-08 11:41:23
“与2013年1月发布的Ajax控件工具包一起修复” – user423430 2013-05-22 20:11:19