をオーバーライドできる以前のHtmlHelper.AntiForgeryTokenstring path
メソッドは非推奨です。
[ObsoleteAttribute("This method is deprecated. Use the AntiForgeryToken() method instead. To specify a custom domain for the generated cookie, use the <httpCookies> configuration element. To specify custom data to be embedded within the token, use the static AntiForgeryConfig.AdditionalDataProvider property.",
true)]
public MvcHtmlString AntiForgeryToken(
string salt,
string domain,
string path
)
を使用するように指示します<httpCookies>
。ただし、 httpCookies要素には PATH の設定がありません。
これは、このメソッドの非推奨の見落としですか? この Cookie パスを上書きする最良の方法は何ですか? (手動で?) 仮想アプリケーションで Web サイトを実行しても、__RequestVeririfcation Cookie にアプリケーション パスが暗黙的に追加されるわけではありません。