【发布时间】:2020-02-17 23:48:28
【问题描述】:
我在 gke kubernetes 中使用 kubernetes StatefulSet 作为hangfire pod。除非我进行复制,否则它工作得很好。由于 Antiforgery 令牌验证,我得到了这个异常:
Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery[7] 反序列化令牌时引发异常。 Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException:防伪令牌可以 不被解密。 ---> System.Security.Cryptography.CryptographicException:密钥 在密钥环中找不到 {9f4f1619-10ff-4283-a529-eb48a0799815}。
请问有什么解决办法吗?
【问题讨论】:
-
您是否为 asp.net core 配置了多个实例?作为这个Data Protection and caching,您可以考虑将Azure Storage 或Redis 作为密钥存储提供者。
标签: asp.net-core kubernetes asp.net-core-2.0 hangfire