We have a historic DNN solution with a few custom modules that was running on v7.3.4.
We've upgraded it in line with the documentation > v7.3.4 > v8.0.3 > v8.0.4.226 > v9.0.0.1002 > v9.0.1.142 > v9.0.2 > v9.1.0.367 > v9.1.1.129-232
Since upgrading we are presented with an error message when on a page containing one of our module:
Server Error in '/' Application.
Cannot unregister UpdatePanel with ID 'DocMap' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported.
Parameter name: updatePanel
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: Cannot unregister UpdatePanel with ID 'DocMap' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported.
Parameter name: updatePanel
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: Cannot unregister UpdatePanel with ID 'DocMap' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported.
Parameter name: updatePanel]
System.Web.UI.PageRequestManager.UnregisterUpdatePanel(UpdatePanel updatePanel) +222
System.Web.UI.UpdatePanel.OnUnload(EventArgs e) +121
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +141
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +355
System.Web.UI.Page.UnloadRecursive(Boolean dispose) +24
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +12361809
System.Web.UI.Page.ProcessRequest() +119
System.Web.UI.Page.ProcessRequest(HttpContext context) +99
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +913
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.36415
Checking online indicates - http://www.dnnsoftware.com/forums/threadid/539307/scope/posts/problems-by-using-of-updatepanel-in-dnn9
Directing you to register the UpdatePanel with ScriptManager prior to it unloading it:
protected void UpdatePanel_Unload(object sender, EventArgs e) {
MethodInfo methodInfo = typeof(ScriptManager).GetMethods(BindingFlags.NonPublic | BindingFlags.Instance)
.Where(i => i.Name.Equals("System.Web.UI.IScriptManagerInternal.RegisterUpdatePanel")).First();
methodInfo.Invoke(ScriptManager.GetCurrent(Page),
new object[] { sender as UpdatePanel });
}
How ever this would require changing the DNN source files and building the solution myself which doesn't seem the correct approach to take considering that this change would need to be edited into each new revision of the DNN framework.
Has anyone experienced this issue themselves? If so how did you correct it?