简体   繁体   English

asp.net 4.0 Web 应用程序中的视图状态错误

[英]Viewstate Error in asp.net 4.0 web-application

I have an error in an web application writen in asp.net 4.0 with c#.我在 asp.net 4.0 和 c# 中编写的 web 应用程序中有错误。 There is a viewstate or viewstate-MAC error with the following message:存在带有以下消息的 viewstate 或 viewstate-MAC 错误:

[FormatException: The Input is not a valid Base-64-String....]
.
.
[ViewStateException: Invalid ViewState....]

I´ve tried everything I found on the web for this error.对于此错误,我已经尝试了在 web 上找到的所有内容。 The error appears if the user clicks on an icon redirecting to the details patch of the selected item of an ListView.如果用户单击重定向到 ListView 所选项目的详细信息补丁的图标,则会出现错误。

Tried without success:试过没有成功:

I hope anyone can help me with this frustrating error.我希望任何人都可以帮助我解决这个令人沮丧的错误。 Thx in advance to all of u...提前向你们所有人致谢...

Since your application is not distributed, try adding this to your web.config :由于您的应用程序未分发,请尝试将其添加到您的web.config

<pages enableViewStateMac="false">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM