Search: Failed to load viewstate

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
1/24/2007 12:20:18 PM
Gravatar
Total Posts 80

Search: Failed to load viewstate

1. Search for something

I'm getting the below error on pages with a SharedFileModule and my own custom module with a DataGrid control. Any ideas?

-Jesse

Server Error in '/mojodev' Application.

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.

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.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.

Source Error:

Line 118:                
Line 119:
Line 120: this.Controls.Add(module);
Line 121: }
Line 122: }

Source File: C:\z_drive\mojoportal_2.x\Web\Controls\CachedSiteModuleControl.cs    Line: 120

Stack Trace:

[HttpException (0x80004005): 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.UI.Control.LoadViewStateRecursive(Object savedState) +353
System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +142
System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +300
System.Web.UI.Control.AddedControl(Control control, Int32 index) +2067969
System.Web.UI.ControlCollection.Add(Control child) +146
mojoPortal.Web.CachedSiteModuleControl.CreateChildControls() in C:\z_drive\mojoportal_2.x\Web\Controls\CachedSiteModuleControl.cs:120
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +21
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +289
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +289
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +289
System.Web.UI.Page.FindControl(String id) +40
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +252
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4526


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
1/24/2007 3:26:37 PM
Gravatar
Total Posts 18439

Re: Search: Failed to load viewstate

This is fixed in svn.

Thanks,

Joe
You must sign in to post in the forums. This thread is closed to new posts.