关于[Sending an anti-forgery token with Razor Pages AJAX requests]的摘要:
ASP.NET Razor Pages uses anti-forgery tokens to protect websites against Cross-site request forgery (CSRF) attacks. When posting information to a Razor Page handler, you need to take special care to send this anti-forgery token otherwise the request fails. This blog post looks at a couple of techniques you can use to ensure the anti-forgery token is sent with your AJAX POST requests.
原文地址: https://www.jerriepelser.com/blog/sending-antiforgery-token-razor-pages-ajax/