Hello, i’m on 5.0.3.
I have been unable to use the Redis Cache for the auth session, from the documentation, it looks plausible to be able to do this but I have been getting this error.
And since it is beeing handled by a try catch, it doesn’t allow me to try and identify the error, even when loading the symbols in the debugger.
Here is part of the stacktrace
at ServiceStack.Redis.RedisClient.Exec[T](Func`2 action)\n at ServiceStack.Redis.RedisClientManagerCacheClient.Get[T](String key)\n at ServiceStack.ServiceExtensions.GetSession(IRequest httpReq, Boolean reload)\n at ServiceStack.Auth.AuthenticateService.Post(Authenticate request)\n at ServiceStack.Host.ServiceRunner`1.<ExecuteAsync>d__13.MoveNext(
Here is the code in the configure section
Plugins.Add(new AuthFeature(() => new AuthUserSession(), new IAuthProvider[] { new CredentialsAuthProvider(AppSettings), new JwtAuthProvider(AppSettings) { AuthKey = AesUtils.CreateKey(), RequireSecureConnection = false } }));
var userAuthRepo = new RedisAuthRepository(container.Resolve<IRedisClientsManager>());
userAuthRepo.InitSchema();
container.Register<IUserAuthRepository>(userAuthRepo);
container.Register(c => c.Resolve<IRedisClientsManager>().GetCacheClient());
//container.Register<ICacheClient>(new MemoryCacheClient());
container.Resolve<ICacheClient>().InitSchema();
If I replace the CacheClient with MemoryCacheClient, everything works. Is there a reason why it would not work? What am I doing wrong in the configuration?
Thanks,