Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Error: "The viewstate is invalid for this page and might be corrup

Reply
Thread Tools

Error: "The viewstate is invalid for this page and might be corrup

 
 
=?Utf-8?B?QmFydG9zeiBLcnp5d2lja2k=?=
Guest
Posts: n/a
 
      06-29-2004
I have a problem with the following error:

"Server Error in '/sir' Application.
--------------------------------------------------------------------------------

The viewstate is invalid for this page and might be corrupted.
"
Page properties are: EnableViewState="True" EnableViewStateMac="False"
I don't have a Web Farm.
I want to keep DataSet in ViewState, so in Page_Load i load some data and save them in the ViewState.
But when I push some button, error occurs in OnInit method in line "base.OnInit(e);"

How can I solve this problem ?
 
Reply With Quote
 
 
 
 
Hans Kesting
Guest
Posts: n/a
 
      06-29-2004

"Bartosz Krzywicki" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have a problem with the following error:
>
> "Server Error in '/sir' Application.
> --------------------------------------------------------------------------------
>
> The viewstate is invalid for this page and might be corrupted.
> "
> Page properties are: EnableViewState="True" EnableViewStateMac="False"
> I don't have a Web Farm.
> I want to keep DataSet in ViewState, so in Page_Load i load some data and save them in the ViewState.
> But when I push some button, error occurs in OnInit method in line "base.OnInit(e);"
>
> How can I solve this problem ?


What exactly do you do? Just a page that posts back to itself, or are there
server.executes, server.transfers or http-handlers involved?

You did set EnableViewStateMac to false, which is the solution
for some of these problems, but apparently not for you.

Why do you want to keep a dataset in viewstate? This will mean that that
entire dataset is transported from the server to the client,
and again from client to server! How big is it?

There are several possibilities to store it server-side (session, cache).


Hans Kesting


 
Reply With Quote
 
 
 
 
=?Utf-8?B?QmFydG9zeiBLcnp5d2lja2k=?=
Guest
Posts: n/a
 
      06-30-2004
> What exactly do you do? Just a page that posts back to itself, or are there
> server.executes, server.transfers or http-handlers involved?


I post back to itself, and I have http-handlers involved

> Why do you want to keep a dataset in viewstate? This will mean that that
> entire dataset is transported from the server to the client,
> and again from client to server! How big is it?
>
> There are several possibilities to store it server-side (session, cache).
>


DataSet isn't big, but I realized (as you said) that keeping it in viewstate isn't good idea, and now I store it in Session. To save DataSet in ViewState you must save it as XML, and than you loose same informations like primary keys, constraints etc.
In Session I can store entire object.
Thanks for answer
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The viewstate is invalid for this page and might be corrup Jason ASP .Net 7 10-13-2004 04:33 AM
The viewstate is invalid for this page and might be corrupted Anatoly ASP .Net 4 11-12-2003 04:28 PM
"viewstate is invalid for this page and might be corrupted" - why does worker process recycling cause this? Trevor Andrew ASP .Net 0 07-25-2003 04:58 AM
The viewstate is invalid for this page and might be corrupted problem Hardy Wang ASP .Net 5 07-04-2003 01:16 PM
Re: The viewstate is invalid for this page and might be corrupted Gordon Moore ASP .Net 0 06-27-2003 04:16 PM



Advertisments