From time to time, my clients gets this error.
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at AjaxControlToolkit.ToolkitScriptManager.GetScriptCombineAttributes(Assembly assembly)
at AjaxControlToolkit.ToolkitScriptManager.IsScriptCombinable(ScriptEntry scriptEntry)
at AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference(ScriptReferenceEventArgs e)
at System.Web.UI.ScriptManager.RegisterScripts()
at System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e)
at System.Web.UI.Page.OnPreRenderComplete(EventArgs e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Comments: Hi all, I tried to implement the fix suggested by etolmachev, but I'm still seeing errors. @Argawaen - by "2 other related dictionaries" are you referring to the '_scriptResourceAttributeCache' and the '_scriptCombineAttributeCache' dictionaries? I'm not a C#er, so I confess to being lost when I look at those routines. The recommended fix is to lock _scriptCombineAttributeCache while we access _webResourceAttributeCache. Is this right? If so, should we also lock _scriptCombineAttributeCache while we access _scriptResourceAttributeCache and _scriptCombineAttributeCache? Any help very much appreciated. Thanks, Paul.
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at AjaxControlToolkit.ToolkitScriptManager.GetScriptCombineAttributes(Assembly assembly)
at AjaxControlToolkit.ToolkitScriptManager.IsScriptCombinable(ScriptEntry scriptEntry)
at AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference(ScriptReferenceEventArgs e)
at System.Web.UI.ScriptManager.RegisterScripts()
at System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e)
at System.Web.UI.Page.OnPreRenderComplete(EventArgs e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Comments: Hi all, I tried to implement the fix suggested by etolmachev, but I'm still seeing errors. @Argawaen - by "2 other related dictionaries" are you referring to the '_scriptResourceAttributeCache' and the '_scriptCombineAttributeCache' dictionaries? I'm not a C#er, so I confess to being lost when I look at those routines. The recommended fix is to lock _scriptCombineAttributeCache while we access _webResourceAttributeCache. Is this right? If so, should we also lock _scriptCombineAttributeCache while we access _scriptResourceAttributeCache and _scriptCombineAttributeCache? Any help very much appreciated. Thanks, Paul.