我正在開發一個使用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