gpt4 book ai didi

asp.net-core - 复制时出现 ASP.NET Core 2.1 Hangfire 错误

转载 作者:行者123 更新时间:2023-12-02 12:31:25 26 4
gpt4 key购买 nike

我在 gke kubernetes 中使用 kubernetes StatefulSet 作为hangfire pod。除非我进行复制,否则它工作得很好。由于 Antiforgery token 验证,我得到了这个异常:

Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery[7] An exception was thrown while deserializing the token. Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted. ---> System.Security.Cryptography.CryptographicException: The key {9f4f1619-10ff-4283-a529-eb48a0799815} was not found in the key ring.



请问有什么解决办法吗?

最佳答案

响应是 Persist DataProtection key to redis

var redis = ConnectionMultiplexer.Connect("localhost,password=password");

services.AddDataProtection()
.PersistKeysToStackExchangeRedis(redis, "DataProtection-Keys");

关于asp.net-core - 复制时出现 ASP.NET Core 2.1 Hangfire 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58493902/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com