473,396 Members | 2,036 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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 ?
Nov 18 '05 #1
2 1322

"Bartosz Krzywicki" <Ba**************@discussions.microsoft.com> wrote in message
news:92**********************************@microsof t.com...
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
Nov 18 '05 #2
> 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 :)
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: atse | last post by:
Hi, I found some websites display nice pages other than a plain error page when you type a wrong URL. How can I do that? Thanks for any idea Atse
1
by: Kevin | last post by:
Help, I am running a pass through query to oracle from SQL server 2000 as follows; select * from openquery(nbsp, 'select * from FND_FLEX_VALUES') I have run this query through both DTS and...
14
by: sinister | last post by:
I have some CGI programs that spit out error pages when the user enters illegal form input. These custom error pages, while informing the user of errors, are otherwise just standard web pages. ...
3
by: ADavidson | last post by:
I'm getting a {"Parser Error: The Runat attribute must have the value Server." } error when I try to get the Server.GetlastError() in the Global.asax codebehind. Why am I getting this? I...
9
by: Martin Eyles | last post by:
Hi, I have set up an asp.net website on another PC in order to test it. The site was fine on my PC, but on the new PC all the pages give the error "The Page Cannot Be Found". Some legacy pages...
0
by: lpinho | last post by:
Hi There, I've generated a C# file from a wsdl file using wsdl.exe utility. Then I created a console application and made a call to the method generated, first I got the error: "The request...
1
by: dave | last post by:
I keep getting the error message below when I try to access my default.aspx page on a MS 2003 server. I am using v2 of .net. I've been rehashing the file security settings and the web settings...
0
by: davidr | last post by:
Hi, I have a panel that I load user Control in no problem. The problem arrises when I do a post back on one of these user controls. I have button it does a click event. In this click event I...
1
by: imranabdulaziz | last post by:
Dear All, I am using sql2005. i am writing stored procedure to save various master data . I recognize master by @type (input verible) and assign it to @mst veriable then based on @mst no I...
1
by: LiveCycle | last post by:
Hi, I've got a longstanding project that's been working fine for about a year. I was working on one of the pages, a simple download page. After making a little tweak on the page, I tried to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.