How to disable View State MAC globally?

主宰稳场 提交于 2019-11-29 06:10:46

You can disable it on the <pages> element in the web.config, like this:

<configuration>
  <system.web>
    <pages enableViewStateMac="False" />
  </system.web>
</configuration>

The answer above explain to you how to set it in the Web.Config, but look at MSDN and you will see what it says here:

This attribute should never be set to false in a production Web site, even if the application or page does not use view state. The view state MAC helps ensure the security of other ASP.NET functions in addition to view state.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!