Why does @Html.AntiForgeryToken() generate different tokens in same response?

后端 未结 6 705
一向
一向 2020-12-16 04:32

A single Razor view contains several forms, each with its own call to @Html.AntiForgeryToken()

@Html.AntiForgeryToken
6条回答
  •  半阙折子戏
    2020-12-16 05:06

    These are not equal antiforgerytoken commands.

    The MVC is generate uniqe for all uniqe commands.

    So you shouldnt wait same generated ID. As I know :)

    Thank you buffjape, for your comment

提交回复
热议问题