简体   繁体   English

Viewstate MAC 验证失败(共享主机 Plesk)

[英]Validation of Viewstate MAC failed (Shared hosting Plesk)

在此处输入图像描述 I am using plesk'shared hosting server to host my website.我正在使用 plesk'shared hosting server 来托管我的网站。 Constantly getting ViewState MAC failed error不断获取 ViewState MAC 失败错误

Plesk won't be able to provide any Machine Key. Plesk 将无法提供任何机器密钥。 As it is shared hosting.因为它是共享主机。

I have also attached the screenshot.我还附上了截图。 please help.请帮忙。

Earlier This issue was coming in one page only.早些时候这个问题只出现在一页上。 I have resolve it by converting it to JavaScript and ajax call in order to Stop AutoPostBack.我已通过将其转换为 JavaScript 和 ajax 调用以停止 AutoPostBack 来解决它。

But now this is coming in many pagaes.但现在这在许多页面中出现了。

Add following link in your web.config file.在 web.config 文件中添加以下链接。

Above line should be included within section.以上行应包含在部分中。

OR或者

if you don't want this solution to implemented on project level then you can add these attribute to the page(Top most line of HTML view) directive of the page which is creating issue.如果您不希望在项目级别实施此解决方案,则可以将这些属性添加到产生问题的页面的页面(HTML 视图的最顶行)指令中。

That means you have to add enableEventValidation="false" viewStateEncryptionMode="Never" in page directive.这意味着您必须在页面指令中添加 enableEventValidation="false" viewStateEncryptionMode="Never"。

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

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