无效的ViewState问题 [英] Invalid ViewState Problems

查看:116
本文介绍了无效的ViewState问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎在我的一个网络应用程序上突然收到此错误消息:


[HttpException(0x80004005):无法验证数据。]

System.Web.Configuration.MachineKey.GetDecodedData(Byte [] buf,Byte []

修饰符,Int32开始,Int32长度,Int32& dataLength)+195

System.Web.UI.LosFormatter.Deserialize(String input)+60

[HttpException(0x80004005):viewstate身份验证失败。 1)如果这是一个集群,请编辑< machineKeyconfiguration,以便所有服务器使用相同的

validationKey和验证算法。 AutoGenerate不能在

集群中使用。 2)Viewstate只能回发到同一页面。 3)此页面的

视图状态可能已损坏。]

System.Web.UI.LosFormatter.Deserialize(字符串输入)+117

System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()+102


[HttpException(0x80004005):Invalid_Viewstate

它继续解释有关页。在一台开发机器上,这个

工作,然后在我的上面,这不是。任何想法为什么会突然开始

发生?

I seem to be getting this error message all of a sudden on one of my web apps:

[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 <machineKeyconfiguration 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() +102

[HttpException (0x80004005): Invalid_Viewstate
And it goes on to explain about the page. On one development machine this
works and then on mine this doesn''t. Any ideas why this would suddenly start
happening?

推荐答案

嗨吉尔斯,

那里是你需要确定的两件事。

1。如果这些机器是webfarm的一部分,请确保所有web.config

validationKey,

decryptionKey在所有机器上具有相同的值。

2你在viewstate中放置的所有对象都是可序列化的。


谢谢,

Aris


" Giles Papworth"写道:
Hi Giles,
There are 2 things you need to make sure of.
1 . If these machines are part of a webfarm make sure all web.config
validationKey,
decryptionKey have the same value across all machines.
2. All objects you place in viewstate are serializable.

Thanks,
Aris

"Giles Papworth" wrote:

我似乎在我的一个网络应用程序上突然收到此错误消息:


[ HttpException(0x80004005):无法验证数据。]

System.Web.Configuration.MachineKey.GetDecodedData(Byte [] buf,Byte []

修饰符,Int32启动, Int32长度,Int32& dataLength)+195

System.Web.UI.LosFormatter.Deserialize(字符串输入)+60

[HttpException(0x80004005): viewstate身份验证失败。 1)如果这是一个集群,请编辑< machineKeyconfiguration,以便所有服务器使用相同的

validationKey和验证算法。 AutoGenerate不能在

集群中使用。 2)Viewstate只能回发到同一页面。 3)此页面的

视图状态可能已损坏。]

System.Web.UI.LosFormatter.Deserialize(字符串输入)+117

System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()+ 102

[HttpException(0x80004005):Invalid_Viewstate


它继续解释一下这个页面。在一台开发机器上,这个

工作,然后在我的上面,这不是。任何想法为什么会突然开始

发生?
I seem to be getting this error message all of a sudden on one of my web apps:

[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 <machineKeyconfiguration 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() +102

[HttpException (0x80004005): Invalid_Viewstate
And it goes on to explain about the page. On one development machine this
works and then on mine this doesn''t. Any ideas why this would suddenly start
happening?


嗨Aris,


这些机器绝对不属于Web场,对象是

definatly serializable。

我已经更改了我的机器配置以确保不会导致问题

但是如果我这样做,那么viewstate问题消失了,另一个出现了。

绰绰有力只有这一个网络应用程序。所有其他人似乎都很好。


Aris Houbavlis写道:
Hi Aris,

These machines are definatly not part of a web farm and the objects are
definatly serializable.
I have changed my machine config to make sure that isn''t causing the problem
however if i do that, the viewstate problem goes away and another appears.
Strangly enough it is only this one web app. All the others seem to work fine.

"Aris Houbavlis" wrote:

嗨吉尔斯,

有两件事你需要确定。

1。如果这些机器是webfarm的一部分,请确保所有web.config

validationKey,

decryptionKey在所有机器上具有相同的值。

2你在viewstate中放置的所有对象都是可序列化的。


谢谢,

Aris


" Giles Papworth"写道:
Hi Giles,
There are 2 things you need to make sure of.
1 . If these machines are part of a webfarm make sure all web.config
validationKey,
decryptionKey have the same value across all machines.
2. All objects you place in viewstate are serializable.

Thanks,
Aris

"Giles Papworth" wrote:

我似乎在我的一个网络应用程序上突然收到此错误消息:


[ HttpException(0x80004005):无法验证数据。]

System.Web.Configuration.MachineKey.GetDecodedData(Byte [] buf,Byte []

修饰符,Int32启动, Int32长度,Int32& dataLength)+195

System.Web.UI.LosFormatter.Deserialize(字符串输入)+60

[HttpException(0x80004005): viewstate身份验证失败。 1)如果这是一个集群,请编辑< machineKeyconfiguration,以便所有服务器使用相同的

validationKey和验证算法。 AutoGenerate不能在

集群中使用。 2)Viewstate只能回发到同一页面。 3)此页面的

视图状态可能已损坏。]

System.Web.UI.LosFormatter.Deserialize(字符串输入)+117

System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()+102


[HttpException(0x80004005):Invalid_Viewstate

它继续解释有关页。在一台开发机器上,这个

工作,然后在我的上面,这不是。任何想法为什么会突然开始

发生?
I seem to be getting this error message all of a sudden on one of my web apps:

[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 <machineKeyconfiguration 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() +102

[HttpException (0x80004005): Invalid_Viewstate
And it goes on to explain about the page. On one development machine this
works and then on mine this doesn''t. Any ideas why this would suddenly start
happening?


我现在也改变了我的机器密钥,这似乎解决了

问题,但现在每次我将数据发布到另一页时,会话似乎都会结束。


" Aris Houbavlis"写道:
Also i have now changed my machine key and that seems to have resolved that
problem but now the session seems to be ending everytime i have posted data
to another page.

"Aris Houbavlis" wrote:

嗨吉尔斯,

有两件事你需要确定。

1。如果这些机器是webfarm的一部分,请确保所有web.config

validationKey,

decryptionKey在所有机器上具有相同的值。

2你在viewstate中放置的所有对象都是可序列化的。


谢谢,

Aris


" Giles Papworth"写道:
Hi Giles,
There are 2 things you need to make sure of.
1 . If these machines are part of a webfarm make sure all web.config
validationKey,
decryptionKey have the same value across all machines.
2. All objects you place in viewstate are serializable.

Thanks,
Aris

"Giles Papworth" wrote:

我似乎在我的一个网络应用程序上突然收到此错误消息:


[ HttpException(0x80004005):无法验证数据。]

System.Web.Configuration.MachineKey.GetDecodedData(Byte [] buf,Byte []

修饰符,Int32启动, Int32长度,Int32& dataLength)+195

System.Web.UI.LosFormatter.Deserialize(字符串输入)+60

[HttpException(0x80004005): viewstate身份验证失败。 1)如果这是一个集群,请编辑< machineKeyconfiguration,以便所有服务器使用相同的

validationKey和验证算法。 AutoGenerate不能在

集群中使用。 2)Viewstate只能回发到同一页面。 3)此页面的

视图状态可能已损坏。]

System.Web.UI.LosFormatter.Deserialize(字符串输入)+117

System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()+102


[HttpException(0x80004005):Invalid_Viewstate

它继续解释有关页。在一台开发机器上,这个

工作,然后在我的上面,这不是。任何想法为什么会突然开始

发生?
I seem to be getting this error message all of a sudden on one of my web apps:

[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 <machineKeyconfiguration 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() +102

[HttpException (0x80004005): Invalid_Viewstate
And it goes on to explain about the page. On one development machine this
works and then on mine this doesn''t. Any ideas why this would suddenly start
happening?


这篇关于无效的ViewState问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆