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/29/2009 11:20:17 AM
Gravatar
Total Posts 1

Failed to load viewstate

Viewstate problem. How to fix?

I'm using a radgridview in radajaxpanel with Telerik library and for example when I change page or click a button (ajax fires) the error is the following:

2009-01-29 15:38:31,218 ERROR mojoPortal.Web.Global - 127.0.0.1-it-IT - /bolle.aspx
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.AddedControl(Control control, Int32 index)
at System.Web.UI.ControlCollection.Add(Control child)
at mojoPortal.Web.UI.Pages.SiteHome.LoadPage() in D:\Progetti\MojoPortal\sourcecode\mojoportal\Web\Default.aspx.cs:line 206
at mojoPortal.Web.UI.Pages.SiteHome.Page_Load(Object sender, EventArgs e) in D:\Progetti\MojoPortal\sourcecode\mojoportal\Web\Default.aspx.cs:line 74
at System.Web.UI.Control.OnLoad(EventArgs e)
at mojoPortal.Web.mojoBasePage.OnLoad(EventArgs e) in D:\Progetti\MojoPortal\sourcecode\mojoportal\Web\Components\mojoBasePage.cs:line 388
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Thanks

 

1/29/2009 11:38:32 AM
Gravatar
Total Posts 18439

Re: Failed to load viewstate

Sorry but this is not a mojoportal bug and should not be reported here. It would be better to ask such questions in our developer forum, but in this case I have no advice for this problem with a commercial control that I have no knowledge of and do not use.

Best,

Joe

7/10/2009 1:30:19 PM
Gravatar
Total Posts 3

Re: Failed to load viewstate

I'm experiencing the same problem while using the RadScheduler. If I turn off the viewstate on the scheduler control, the problem goes away, but then of course the scheduler doesn't maintain its state which causes other problems.

Were you able to find a resolution to this issue? Thanks in advance for sharing what you've learned--it would make a big difference to me.

Mark

7/10/2009 1:40:53 PM
Gravatar
Total Posts 18439

Re: Failed to load viewstate

I don't know about this control, but I can tell you that viewstate errors can happen if a user clicks a button before the page is completely loaded, also if anything is cached on the page using output caching it can cause viewstate errors. Basically don't acache any page that posts back. Not sure if this info is relevant but thought it worth mentioning.

Best,

Joe 

7/10/2009 2:13:51 PM
Gravatar
Total Posts 3

Re: Failed to load viewstate

Thanks for the quick response Joe. I'm not using output caching and it's not a problem with clicking before the page finishes loading. I'm pretty certain it's an issue with Telerik's Rad controls in mojoPortal.  Hopefully, the original poster found a solution. If not, I'll post here whatever I figure out.

Thanks,

Mark

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