Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个添加/编辑用户页面,我在其中使用了紧密耦合视图。因此,无论何时最终用户要添加/编辑用户(在我们的术语 POST 方法中),发送到服务器的所有值都是纯文本。最终用户可以轻松地修改请求,或者服务器可以被相同的请求轰炸,只需更改一些值。我可以知道如何限制它吗?
查看 MVC3 中内置的防伪令牌助手(旨在完全防止您正在谈论的跨站点请求):
http://blog.stevensanderson.com/2008/09/01/prevent-cross-site-request-forgery-csrf-using-aspnet-mvcs-antiforgerytoken-helper/