473,322 Members | 1,540 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,322 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 6001
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.