Invalid viewstate

G

Guest

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.LoadPageStateFromPersistenceMedium() +101
 
G

Guest

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>
 
G

Guest

enableViewStateMac="false" solved my problem

vinay said:
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 said:
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.LoadPageStateFromPersistenceMedium() +101
 
J

Jim Cheshire [MSFT]

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
(e-mail address removed)

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=?=" <[email protected]>
| Subject: Invalid viewstate
| Date: Tue, 9 Nov 2004 13:34:04 -0800
| Lines: 19
| Message-ID: <[email protected]>
| 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.LoadPageStateFromPersistenceMedium() +101
|
|
|
 
J

Jim Cheshire [MSFT]

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
(e-mail address removed)

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=?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: Invalid viewstate
| Date: Tue, 9 Nov 2004 15:45:01 -0800
| Lines: 37
| Message-ID: <[email protected]>
| 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.LoadPageStateFromPersistenceMedium() +101
| > >
| > >
|
 
G

Guest

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 said:
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
(e-mail address removed)

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=?=" <[email protected]>
| Subject: Invalid viewstate
| Date: Tue, 9 Nov 2004 13:34:04 -0800
| Lines: 19
| Message-ID: <[email protected]>
| 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.LoadPageStateFromPersistenceMedium() +101
|
|
|
 
G

Guest

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 said:
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 said:
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
(e-mail address removed)

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=?=" <[email protected]>
| Subject: Invalid viewstate
| Date: Tue, 9 Nov 2004 13:34:04 -0800
| Lines: 19
| Message-ID: <[email protected]>
| 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.LoadPageStateFromPersistenceMedium() +101
|
|
|
 
Joined
May 1, 2008
Messages
1
Reaction score
0
I don't believe it's related to HyperThread. My guess is that issue is related to IIS 5.1 versus IIS 6.0.

Did anyone solve this?

Thanks

Marcelo

=?Utf-8?B?SHV6YWlmYSBUYXBhbA==?= said:
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
> > (e-mail address removed)
> >
> > 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=?=" <[email protected]>
> > | Subject: Invalid viewstate
> > | Date: Tue, 9 Nov 2004 13:34:04 -0800
> > | Lines: 19
> > | Message-ID: <[email protected]>
> > | 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.LoadPageStateFromPersistenceMedium() +101
> > |
> > |
> > |
> >
> >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top