473,651 Members | 2,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ViewState Error

I'm creating a web application using c# and keep getting
the following error:
The viewstate is invalid for this page and might be
corrupted.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where
it originated in the code.

Exception Details: System.Web.Http Exception: The viewstate
is invalid for this page and might be corrupted.

Source Error:

An unhandled exception was generated during the execution
of the current web request. Information regarding the
origin and location of the exception can be identified
using the exception stack trace below.

Stack Trace:
[HttpException (0x80004005): The viewstate is invalid for
this page and might be corrupted.]
System.Web.UI.P age.LoadPageSta teFromPersisten ceMedium()
System.Web.UI.P age.LoadPageVie wState()
System.Web.UI.P age.ProcessRequ estMain()

Can anybody tell me where i'm going wrong?

Cheers

Rob

Nov 15 '05 #1
4 1476
Most common reason for corruption is an improper EnableViewState or
EnableViewState Mac setting for the page. The only other time I have
personally seen this is when a developer improperly used ViewState.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** *************** *************** *************** **********
Think Outside the Box!
*************** *************** *************** *************** **********
"Rob Reckless" <ro**********@p rime-medica.com> wrote in message
news:08******** *************** *****@phx.gbl.. .
I'm creating a web application using c# and keep getting
the following error:
The viewstate is invalid for this page and might be
corrupted.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where
it originated in the code.

Exception Details: System.Web.Http Exception: The viewstate
is invalid for this page and might be corrupted.

Source Error:

An unhandled exception was generated during the execution
of the current web request. Information regarding the
origin and location of the exception can be identified
using the exception stack trace below.

Stack Trace:
[HttpException (0x80004005): The viewstate is invalid for
this page and might be corrupted.]
System.Web.UI.P age.LoadPageSta teFromPersisten ceMedium()
System.Web.UI.P age.LoadPageVie wState()
System.Web.UI.P age.ProcessRequ estMain()

Can anybody tell me where i'm going wrong?

Cheers

Rob

Nov 15 '05 #2
I am using the default viewstate, so there should be no
problem, i've never experienced this before
-----Original Message-----
Most common reason for corruption is an improper EnableViewState orEnableViewStat eMac setting for the page. The only other time I havepersonally seen this is when a developer improperly used ViewState.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************** *************** *************** ************** ************Think Outside the Box!
************** *************** *************** ************** ************"Rob Reckless" <ro**********@p rime-medica.com> wrote in messagenews:08******* *************** ******@phx.gbl. ..
I'm creating a web application using c# and keep getting
the following error:
The viewstate is invalid for this page and might be
corrupted.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.Http Exception: The viewstate is invalid for this page and might be corrupted.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the
origin and location of the exception can be identified
using the exception stack trace below.

Stack Trace:
[HttpException (0x80004005): The viewstate is invalid for this page and might be corrupted.]
System.Web.UI.P age.LoadPageSta teFromPersisten ceMedium () System.Web.UI.P age.LoadPageVie wState()
System.Web.UI.P age.ProcessRequ estMain()

Can anybody tell me where i'm going wrong?

Cheers

Rob

.

Nov 15 '05 #3
start here
http://www.extremeexperts.com/Net/FA...isCorrupt.aspx

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Rob Reckless" <ro**********@p rime-medica.com> wrote in message
news:07******** *************** *****@phx.gbl.. .
I am using the default viewstate, so there should be no
problem, i've never experienced this before
-----Original Message-----
Most common reason for corruption is an improper

EnableViewState or
EnableViewStat eMac setting for the page. The only other

time I have
personally seen this is when a developer improperly used

ViewState.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************** *************** *************** **************

************
Think Outside the Box!
************** *************** *************** **************

************
"Rob Reckless" <ro**********@p rime-medica.com> wrote in

message
news:08******* *************** ******@phx.gbl. ..
I'm creating a web application using c# and keep getting
the following error:
The viewstate is invalid for this page and might be
corrupted.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.Http Exception: The viewstate is invalid for this page and might be corrupted.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the
origin and location of the exception can be identified
using the exception stack trace below.

Stack Trace:
[HttpException (0x80004005): The viewstate is invalid for this page and might be corrupted.]
System.Web.UI.P age.LoadPageSta teFromPersisten ceMedium () System.Web.UI.P age.LoadPageVie wState()
System.Web.UI.P age.ProcessRequ estMain()

Can anybody tell me where i'm going wrong?

Cheers

Rob

.

Nov 15 '05 #4
Thanks, Microsoft are sending my the Fix
Nov 15 '05 #5

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

Similar topics

2
4883
by: theo | last post by:
Hi... I wish to extract the text content of an Xml file and assign it to DropDownList controls at runtime.I can get the Xml file text content into the DropDownList controls (Ex...if 5 Xml text tags then 5 dropdownlist controls each containing the 5 Xml text tags). Problem,when I save the user DropDownList selected items by means of a button click the web form looses the PlaceHolder viewstate and generates the following error..."Object...
9
21638
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter the results in the grid. Say you filter the grid for records that have a certain condition set to "NO" (in this case a checkbox). In this scenario the search returns one result. If I then check the checkbox ("YES") and save it, I now get my message...
1
3743
by: Ralph Soons | last post by:
Hi all, I am trying to save the viewstate in a session instead of storing it in a hidden of the webpage which is default. This because of performance reasons. When I use line 2 in combination with line 4, my application works. Using Line 1 in combination with line 3 (and of course renaming httpSessionState1 to httpSessionState) results in the error as mentioned below. protected override object LoadPageStateFromPersistenceMedium() {
2
1982
by: Janaka | last post by:
We have managed to lock down 99% of the application errors occurring in our asp.net sites. The only errors which occur on a regular basis now are viewstate errors. We have disabled viewstate on the majority of pages but kept them where absolutely necessary, such as shopping carts, adding items, etc. Also we've made sure the following have been met: EnableViewStateMac = false Disabled viewstate on all controls which are unnecessary...
11
2471
by: Nad | last post by:
Hello, I have a page with two link buttons. When I click on the first one I call server.execute("target.aspx") to view target.aspx on the original page. Then I click on the second link button and in this case I redirect to another page, HOWEVER, I get Invalid ViewState exception. I know the problem stems from server.execute but don't know why. Any Ideas? Thank you.
9
4912
by: Jamie | last post by:
I am receiving an Invalid ViewState error after posting back to the same page twice. Consistently the error occurs after the second postback and not after the first. I have looked into creating a static machinekey in the machine.config and that did not help. I believe that issue only occurred when there was an inconsistent viewstate error. The error I am faced with consistently occurs. Are there any known problems with the ViewState...
1
3452
by: Tim | last post by:
Greetings! I have a UserControl. On this UserControl is a Panel and a RadioButtonList. The Panel's Visible property is set to false by default. When the user selects a particular RadioButtonList value, a postback is performed and the Panel's Visible property is set to true. Selecting a different RadioButtonList value sets the Visible property to false again. So far, so good. It does, in fact, do this.
10
3076
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web config does specify a machinekey setting: <machineKey validationKey="447C05E8B3A71401CC4CAE5513A7F1A3494A3618EE819316AAD1D58433F236A759D66FB4154500E01EB4E1BC1DE42046E2D652D391CB8367A1649438867A02EB"...
7
2124
by: GS | last post by:
Hello, I'm receiving The state information is invalid for this page and might be corrupted error message when running code below. This happens on second post back. Why is it happening? My webpage contains 2 dropdowns controls and I save information entered by user in ViewState variable containing array ArrayList MyCoordinates = (ArrayList) ViewState ; if (MyCoordinates == null) { MyCoordinates = new ArrayList ();
0
5734
by: tynorton | last post by:
Hey, I've been working on this issue for a while now, with no leads or success. The scenario is a homemade modal dialog using UpdatePanels. There a couple ImageButtons inside of usercontrols with their OnClick events delegated to file.aspx. Here is my error (These happen fairly infrequently, say, 5-10 times an
0
8357
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8277
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8803
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8581
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4285
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.