xform and ViewState Error

Vote:
 

Hi,

We have an issue in our production environment regarding publish and edit of pages with a page type that contains a xform property. If we create a new page, saves it(save and publish for example), everything looks fine. But if we then hit edit again,the page fails with a viewstate error. If we then reload the edit UI again, we can edit and publsh and save and do whatever without ever getting this error again. IF the xform property is removed from the page type it works just fine. The strange thing is that this does not happen with the same source code in our development, test and stageing environment. Does anybody have a clue about what couses this?

Log debug info:

2010-11-25 15:22:59,429 DEBUG [15] EPiServer.DataAccess.PageSaveDB+<>c__DisplayClass1f.<Save>b__1e - 2.13.1 Page save Publish User='xxx' PageLink='72908'
2010-11-25 15:23:02,101 ERROR [24] EPiServer.Global.Global_Error - 1.2.5 Unhandled exception in ASP.NET
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> 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.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 ---
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.udfui_edit_editpanel_aspx.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

#46063
Nov 25, 2010 15:42
Vote:
 

EpiServer CMS 5R2 on windows server 2008:)

#46081
Nov 26, 2010 0:11
Vote:
 

I'm still wondering about this.. Nobody having any idea?

#46420
Dec 10, 2010 14:35
Vote:
 

We are also having the exact same problem in our production environment!

#47420
Jan 27, 2011 15:40
Vote:
 

Hi! Found any solution to this yet?

 

#48868
Feb 18, 2011 11:27
Vote:
 

Are you perhaps using a load balanced solution where your users get sent to different servers on postback (and the server don't have matching machine keys)?

#48880
Feb 18, 2011 22:18
Vote:
 

Another tips would be to check the actual xform xml definition and see that it hasn't changed from when you published it to when you view it.

#48882
Feb 18, 2011 23:48
Vote:
 

The site usually runs in an load balanced environment, but lately only one node has been running, and we still get the same problem. The xform property doesn't have to be used, butt still the same error is thrown

#49553
Mar 23, 2011 11:39
Vote:
 

This typicaly occurs if you have an editpanel plugin that adds controls in page load. For more info see:
http://world.episerver.com/Blogs/Mari-Jorgensen/Dates/2011/6/Failed-to-load-viewstate/
(Seems only to be related to EPiServer CMS 5). 

#51544
Jun 14, 2011 12:02
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.