Try setting (in global.cs):

AntiForgeryConfig.UniqueClaimTypeIdentifier = ClaimTypes.NameIdentifier;

I think it's important to note why this works: This tells the AntiForgery class to use the NameIdentifier (which is the user id string found by GetUserId).

相关文章:

  • 2021-05-21
  • 2022-12-23
  • 2021-07-19
  • 2021-12-30
  • 2022-12-23
  • 2021-09-08
  • 2021-11-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-04
  • 2021-06-21
  • 2022-12-23
  • 2021-12-31
  • 2018-07-05
相关资源
相似解决方案