This is a migrated thread and some comments may be shown as answers.

Viewstate Problems

4 Answers 305 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 14 Jun 2008, 01:22 AM
Hello,

I've got a page with a ton of rad ajax controls on it and I've been having a lot of viewstate problems. I keep getting various errors coming in on invalid or corrupted viewstates. I know that I've got a huge viewstate on the page and I assume that twhat's happening is the viewstate is not loading completely and then getting mixed up when people hit try to move around the page too quickly.

Still... is there anything I can do about that? I know I didn't give a lot of informaiton here... the page/system is quite large and I'm not sure I'd be able to send it... even if I could... everything is db driven and I can't give access to the db for testing. With that said, if anybody has any ideas about how I might be able to get around some of these issues I would greatly appreciate it...

Thank you,

Mike



This is characteristic of what I've been getting back:

. Error Message: The state information is invalid for this page and might be corrupted.

. Base Exception Message: Invalid viewstate. Client IP: XXXXX Port: 2685 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 ViewState: /wEWMwLusu/jAgLOvq3CBgLpp8tXAoS
R6ewKAp/6hoIFAuKZtu0NAt7RhPsCArv71K8HAq7NzJEMAqDv6qsIAvPuxuEDAvaplpIGAtPT5sYKAsal3qgPApfLrNIBAurKiIgNAr/GtbkKAp3PgroNAoLm5KQDAtOhvuQBAri4oM8HArGqi+UEAon09Y4GAtfQ5bcLAsLR0oMKAt757skPAsX/970MAundxZIKAovW3ZsPArX20b0HAp7vmfwKAubOycoMAsLWopgHAuap1cUOAuapzc0JAuappbkPAqHs6NoLAqHs4McNAqHsuLMDAqHssLsOAqHsiKcEAsi42v8DAsi40uwFAtiQyLgPAo2V5P8BAp6Wm8cPAuCh6rsNAq6245YGApntjN0KAtGx7fsHAvWUpuMHNf7dOBATOHfBgKQ0SC0lLjWCaBg= Referer: http://isanet.ccit.arizona.edu/MyISA/Validated/ConferenceManager/SubmissionManager.aspx Path: /MyISA/Validated/ConferenceManager/SubmissionManager.aspx

. Stack Trace: at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) at System.Web.UI.ClientScriptManager.EnsureEventValidationFieldLoaded() at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) at System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) at System.Web.UI.WebControls.HiddenField.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.WebControls.HiddenField.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) 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.validated_conferencemanager_submissionmanager_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously).

4 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 16 Jun 2008, 07:32 AM
Hi Mike,

You can put the ViewState string in session similar to my example:
http://blogs.telerik.com/vladimirenchev/Posts/07-09-25/How_wrong_custom_ViewState_handling_may_harm_more_than_help.aspx?ReturnURL=%2fvladimirenchev%2fposts.aspx%3fYear%3d2007%26Month%3d9

Kind regards,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mike
Top achievements
Rank 1
answered on 16 Jun 2008, 07:41 AM
Hi,

Thank you for your reply... Please excuse my ignorance here... but what are the advantages and disadvantages of this? Does it basically transfer the load of the viewstate to the server?

Thank you again,

Mike
0
Vlad
Telerik team
answered on 16 Jun 2008, 08:05 AM
Hi Mike,

You can check this article for more info:
http://aspalliance.com/72

Regards,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mike
Top achievements
Rank 1
answered on 18 Jun 2008, 10:09 AM
Thank you... I am consistently impressed with Telerik.
Tags
Ajax
Asked by
Mike
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Mike
Top achievements
Rank 1
Share this question
or