(Solution at bottom :-)
After upgrading from version 4.8 to the newest version 5.x, we got follwing exception when accessing frontpage of our DNN site:
DotNetNuke.Services.Exceptions.PageLoadException: The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.
System.Web.HttpException: The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.
at System.Web.UI.ControlCollection.Add(Control child)
at DotNetNuke.UI.Utilities.MSAJAX.Register(Page objPage)
at DotNetNuke.UI.Utilities.MSAJAX.RegisterClientScript(Page objPage, String Path)
at DotNetNuke.UI.Utilities.ClientAPI.RegisterClientScriptBlock(Page objPage, String key)
at DotNetNuke.UI.Utilities.ClientAPI.RegisterClientReference(Page objPage, ClientNamespaceReferences eRef)
at DotNetNuke.UI.Utilities.ClientAPI.RegisterClientReference(Page objPage, ClientNamespaceReferences eRef)
at DotNetNuke.UI.Utilities.DNNClientAPI.EnableMinMax(Control objButton, Control objContent, Int32 intModuleId, Boolean blnDefaultMin, String strMinIconLoc, String strMaxIconLoc, MinMaxPersistanceType ePersistanceType, Int32 intAnimationFrames, String strPersonalizationNamingCtr, String strPersonalizationKey)
at DotNetNuke.UI.Utilities.DNNClientAPI.EnableMinMax(Control objButton, Control objContent, Boolean blnDefaultMin, String strMinIconLoc, String strMaxIconLoc, MinMaxPersistanceType ePersistanceType, String strPersonalizationNamingCtr, String strPersonalizationKey)
at DotNetNuke.UI.ControlPanels.IconBar.Page_PreRender(Object sender, EventArgs e) in D:\Workspace\merkurbank.dk www\Admin\ControlPanel\IconBar.ascx.vb:line 381
at System.Web.UI.Control.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--- End of inner exception stack trace ---
Solution:
The solution was simple. Go to the DDN database table "HostSettings" and set EnableAjax to 'Y'.
I havent researched why this is necesary yet, but i recon IconBar in v5.x has some kind of dependcy to MS Ajax.
I hope this will help someone out there, we had trouble finding any answers to the problem. :-)