EnableViewStateMac

zhyx21century 2003-01-10 10:07:07
<%@ Page EnableViewStateMac="false" %>
what's means?
...全文
76 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
saucer 2003-01-10
  • 打赏
  • 举报
回复
see

http://expert.csdn.net/Expert/topic/1344/1344655.xml?temp=.679485
zhyx21century 2003-01-10
  • 打赏
  • 举报
回复
yohomonkey(ht---牛牛---楚江逸士)
我的iis还是不能启动呀
zhyx21century 2003-01-10
  • 打赏
  • 举报
回复
9494

希望继续回答呀
thanks
yohomonkey 2003-01-10
  • 打赏
  • 举报
回复
to saucer(思归, MS .NET MVP) :
如果设置EnableViewStateMac="false" ,有方法来提交page吗?
saucer 2003-01-10
  • 打赏
  • 举报
回复
from the documentation:

EnableViewStateMac
Indicates that ASP.NET should run a machine authentication check (MAC) on the page's view state when the page is posted back from the client. true if view state should be MAC checked; otherwise, false. The default is true.

Note A view state MAC is an encrypted version the hidden variable that a page's view state is persisted to when sent to the browser. When you set this attribute to true, the encrypted view state is checked to verify that it has not been tampered with on the client.

意即,如果EnableViewStateMac="false" 的话,ASP.NET不再对ViewState作校验,黑客可以任意改动ViewState,所以是不推荐的做法。但就是很多人爱提交FORM到另外一个页面,如果EnableViewStateMac是true的话,直接提交ASP.NET会给你出错,但把EnableViewStateMac设成false则没事了,这是种投机取巧的方法

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧