DotNetNuke.Services.Exceptions.PageLoadException: Failed to load viewstate Problem Solved / Fixed

Error
An error has occurred.
DotNetNuke.Services.Exceptions.PageLoadException: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request. —> System.Web.HttpException: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request. at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Page.LoadAllState() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) — End of inner exception stack trace —

How we got this error.

Today while playing with a new clients site, I received this error while uploading a module. Now under normal circumstances I would run around looking at the DNN install, or the module developer to challenge them as to what is wrong, and can they fix it.

However as I was the Server Admin, and the person who setup the database and website, I had enough confidence to know that all that side of things was correct. And in this case the dnn module developer was InteractiveWebs (us). So no need to go hunting there.

So I started looking closely at the error and thinking outside the box.

Knowing all the other “ducks were in a row” I concluded that the user session state must no longer be valid. Even though I could move around in the DNN Host Account and all appeared to work fine.

Solution / Fix

  • Log our of the site
  • Log back into the site 

All was resolved! So I cannot explain exactly why the session state had expired, but I do know that if an Airbus A380 can require 20 computer resets to flying, then a DNN website can require one every now and again. Hope it helps.

Digg This

Leave a Reply