473,385 Members | 1,357 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,385 software developers and data experts.

Invalid viewstate

What is this error??

Exception Details: System.Web.HttpException: Unable to validate data.
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKey.GetDecodedData (Byte[] buf, Byte[]
modifier, Int32 start, Int32 length, Int32& dataLength) +195
System.Web.UI.LosFormatter.Deserialize(String input) +60

[HttpException (0x80004005): Authentication of viewstate failed. 1) If this
is a cluster, edit <machineKey> configuration so all servers use the same
validationKey and validation algorithm. AutoGenerate cannot be used in a
cluster. 2) Viewstate can only be posted back to the same page. 3) The
viewstate for this page might be corrupted.]
System.Web.UI.LosFormatter.Deserialize(String input) +117
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +101
Nov 18 '05 #1
6 6007
i am getting it when i am doing a post

How to avoid the error??

<script language="javascript">
function submitMe() {
var frm = document.all('Form1');
frm.action = "WebForm4.aspx";
frm.submit();
}
</script>

"vinay" wrote:
What is this error??

Exception Details: System.Web.HttpException: Unable to validate data.
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKey.GetDecodedData (Byte[] buf, Byte[]
modifier, Int32 start, Int32 length, Int32& dataLength) +195
System.Web.UI.LosFormatter.Deserialize(String input) +60

[HttpException (0x80004005): Authentication of viewstate failed. 1) If this
is a cluster, edit <machineKey> configuration so all servers use the same
validationKey and validation algorithm. AutoGenerate cannot be used in a
cluster. 2) Viewstate can only be posted back to the same page. 3) The
viewstate for this page might be corrupted.]
System.Web.UI.LosFormatter.Deserialize(String input) +117
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +101

Nov 18 '05 #2
enableViewStateMac="false" solved my problem

"vinay" wrote:
i am getting it when i am doing a post

How to avoid the error??

<script language="javascript">
function submitMe() {
var frm = document.all('Form1');
frm.action = "WebForm4.aspx";
frm.submit();
}
</script>

"vinay" wrote:
What is this error??

Exception Details: System.Web.HttpException: Unable to validate data.
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKey.GetDecodedData (Byte[] buf, Byte[]
modifier, Int32 start, Int32 length, Int32& dataLength) +195
System.Web.UI.LosFormatter.Deserialize(String input) +60

[HttpException (0x80004005): Authentication of viewstate failed. 1) If this
is a cluster, edit <machineKey> configuration so all servers use the same
validationKey and validation algorithm. AutoGenerate cannot be used in a
cluster. 2) Viewstate can only be posted back to the same page. 3) The
viewstate for this page might be corrupted.]
System.Web.UI.LosFormatter.Deserialize(String input) +117
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +101

Nov 18 '05 #3
Hi Vinay,

Based upon the information you've provided, it seems that you are posting
from one page to another page. That is not supported in ASP.NET. If you
programmatically change the action of the form as you've done, it will
cause this exception. The reason is that the control tree on the second
page does not match the control tree on the first page.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
ASP.NET Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
| Thread-Topic: Invalid viewstate
| thread-index: AcTGo9Yr8t7DQi0vS+6Lm8H7osKvLQ==
| X-WBNR-Posting-Host: 207.238.101.61
| From: "=?Utf-8?B?dmluYXk=?=" <vi***@discussions.microsoft.com>
| Subject: Invalid viewstate
| Date: Tue, 9 Nov 2004 13:34:04 -0800
| Lines: 19
| Message-ID: <95**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:274852
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| What is this error??
|
| Exception Details: System.Web.HttpException: Unable to validate data.
|
|
| [HttpException (0x80004005): Unable to validate data.]
| System.Web.Configuration.MachineKey.GetDecodedData (Byte[] buf, Byte[]
| modifier, Int32 start, Int32 length, Int32& dataLength) +195
| System.Web.UI.LosFormatter.Deserialize(String input) +60
|
| [HttpException (0x80004005): Authentication of viewstate failed. 1) If
this
| is a cluster, edit <machineKey> configuration so all servers use the same
| validationKey and validation algorithm. AutoGenerate cannot be used in a
| cluster. 2) Viewstate can only be posted back to the same page. 3) The
| viewstate for this page might be corrupted.]
| System.Web.UI.LosFormatter.Deserialize(String input) +117
| System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +101
|
|
|

Nov 18 '05 #4
Hi Vinay,

FYI, it is not recommended that you disable the machine authentication
check. If you do, you open yourself up to someone tampering with the
viewstate.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
ASP.NET Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
| Thread-Topic: Invalid viewstate
| thread-index: AcTGtiEZo23tyl/YRyGg1fUnxKBDzw==
| X-WBNR-Posting-Host: 207.238.101.61
| From: "=?Utf-8?B?dmluYXk=?=" <vi***@discussions.microsoft.com>
| References: <95**********************************@microsoft.co m>
<4B**********************************@microsoft.co m>
| Subject: RE: Invalid viewstate
| Date: Tue, 9 Nov 2004 15:45:01 -0800
| Lines: 37
| Message-ID: <B2**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:274886
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| enableViewStateMac="false" solved my problem
|
| "vinay" wrote:
|
| > i am getting it when i am doing a post
| >
| > How to avoid the error??
| >
| > <script language="javascript">
| > function submitMe() {
| > var frm = document.all('Form1');
| > frm.action = "WebForm4.aspx";
| > frm.submit();
| > }
| > </script>
| >
| > "vinay" wrote:
| >
| > > What is this error??
| > >
| > > Exception Details: System.Web.HttpException: Unable to validate data.
| > >
| > >
| > > [HttpException (0x80004005): Unable to validate data.]
| > > System.Web.Configuration.MachineKey.GetDecodedData (Byte[] buf,
Byte[]
| > > modifier, Int32 start, Int32 length, Int32& dataLength) +195
| > > System.Web.UI.LosFormatter.Deserialize(String input) +60
| > >
| > > [HttpException (0x80004005): Authentication of viewstate failed. 1)
If this
| > > is a cluster, edit <machineKey> configuration so all servers use the
same
| > > validationKey and validation algorithm. AutoGenerate cannot be used
in a
| > > cluster. 2) Viewstate can only be posted back to the same page. 3)
The
| > > viewstate for this page might be corrupted.]
| > > System.Web.UI.LosFormatter.Deserialize(String input) +117
| > > System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +101
| > >
| > >
|

Nov 18 '05 #5
Hello Jim,

I am also getting the same error. I am not on a Server Farm, however, I
am using Server.Transfer taking advantage of the performance gain and
being able to add querystring values to the Context.

Doing some research, some people mentioned that if you specify the
second parameter value to Server.Transfer as true would cause this
problem to occur, however, thats not the case for me. Also, I am not
changing the form action value either. For the most part the form is posted
back to the same page and within the event handler of the postback I am doing
a Server.Transfer to another page.

The wierd part is that I cannot replicate this problem on my development
box which is on a Windows XP Professional machine running IIS 5. I keep
getting this error on a Window 2003 production box.

Any help would be greatly appreciated.
"Jim Cheshire [MSFT]" wrote:
Hi Vinay,

Based upon the information you've provided, it seems that you are posting
from one page to another page. That is not supported in ASP.NET. If you
programmatically change the action of the form as you've done, it will
cause this exception. The reason is that the control tree on the second
page does not match the control tree on the first page.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
ASP.NET Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
| Thread-Topic: Invalid viewstate
| thread-index: AcTGo9Yr8t7DQi0vS+6Lm8H7osKvLQ==
| X-WBNR-Posting-Host: 207.238.101.61
| From: "=?Utf-8?B?dmluYXk=?=" <vi***@discussions.microsoft.com>
| Subject: Invalid viewstate
| Date: Tue, 9 Nov 2004 13:34:04 -0800
| Lines: 19
| Message-ID: <95**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:274852
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| What is this error??
|
| Exception Details: System.Web.HttpException: Unable to validate data.
|
|
| [HttpException (0x80004005): Unable to validate data.]
| System.Web.Configuration.MachineKey.GetDecodedData (Byte[] buf, Byte[]
| modifier, Int32 start, Int32 length, Int32& dataLength) +195
| System.Web.UI.LosFormatter.Deserialize(String input) +60
|
| [HttpException (0x80004005): Authentication of viewstate failed. 1) If
this
| is a cluster, edit <machineKey> configuration so all servers use the same
| validationKey and validation algorithm. AutoGenerate cannot be used in a
| cluster. 2) Viewstate can only be posted back to the same page. 3) The
| viewstate for this page might be corrupted.]
| System.Web.UI.LosFormatter.Deserialize(String input) +117
| System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +101
|
|
|

Nov 19 '05 #6
What boggled me the most was that I used to have the same site up on a
production Windows 2003 box about 4 months back and this was not a problem
back then. Checking the difference between that Windows 2003 box and the
current one, I see that the new one is a HyperThreaded installation of
Windows 2003.

Not sure if that makes any difference.

"Huzaifa Tapal" wrote:
Hello Jim,

I am also getting the same error. I am not on a Server Farm, however, I
am using Server.Transfer taking advantage of the performance gain and
being able to add querystring values to the Context.

Doing some research, some people mentioned that if you specify the
second parameter value to Server.Transfer as true would cause this
problem to occur, however, thats not the case for me. Also, I am not
changing the form action value either. For the most part the form is posted
back to the same page and within the event handler of the postback I am doing
a Server.Transfer to another page.

The wierd part is that I cannot replicate this problem on my development
box which is on a Windows XP Professional machine running IIS 5. I keep
getting this error on a Window 2003 production box.

Any help would be greatly appreciated.
"Jim Cheshire [MSFT]" wrote:
Hi Vinay,

Based upon the information you've provided, it seems that you are posting
from one page to another page. That is not supported in ASP.NET. If you
programmatically change the action of the form as you've done, it will
cause this exception. The reason is that the control tree on the second
page does not match the control tree on the first page.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
ASP.NET Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
| Thread-Topic: Invalid viewstate
| thread-index: AcTGo9Yr8t7DQi0vS+6Lm8H7osKvLQ==
| X-WBNR-Posting-Host: 207.238.101.61
| From: "=?Utf-8?B?dmluYXk=?=" <vi***@discussions.microsoft.com>
| Subject: Invalid viewstate
| Date: Tue, 9 Nov 2004 13:34:04 -0800
| Lines: 19
| Message-ID: <95**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:274852
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| What is this error??
|
| Exception Details: System.Web.HttpException: Unable to validate data.
|
|
| [HttpException (0x80004005): Unable to validate data.]
| System.Web.Configuration.MachineKey.GetDecodedData (Byte[] buf, Byte[]
| modifier, Int32 start, Int32 length, Int32& dataLength) +195
| System.Web.UI.LosFormatter.Deserialize(String input) +60
|
| [HttpException (0x80004005): Authentication of viewstate failed. 1) If
this
| is a cluster, edit <machineKey> configuration so all servers use the same
| validationKey and validation algorithm. AutoGenerate cannot be used in a
| cluster. 2) Viewstate can only be posted back to the same page. 3) The
| viewstate for this page might be corrupted.]
| System.Web.UI.LosFormatter.Deserialize(String input) +117
| System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +101
|
|
|

Nov 19 '05 #7

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

Similar topics

0
by: Anup Jishnu | last post by:
Hi, I have installed ASP.Net application on a system. When accessing the Application from within the LAN, it works fine. However, when I access the application from the Internet, some pages...
4
by: Ersin Gençtürk | last post by:
Server : WEB System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.Web.HttpException: The View State is invalid for this page and might be...
2
by: Mike | last post by:
hi to all does any body know or receive this message before and how i can repare this: The viewstate is invalid for this page and might be corrupted. thank's Mike
2
by: Brad | last post by:
I have an intranet app that has just started sporadically getting the following error "The viewstate is invalid for this page and might be corrupted." By sproadic I mean 3-4 times during the past...
5
by: Anup Jishnu | last post by:
Hi, I have installed ASP.Net application on a system. When accessing the Application from within the LAN, it works fine. However, when I access the application from the Internet, some pages...
7
by: Jason | last post by:
Can anybody help on 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...
11
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...
9
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.