Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 ServiceStack 中,这条线是不正确的。
userSession = this.Cache.Get(SessionKey); (线:28)
调用此代码时,缓存为空。
我的生产网站现在坏了。
有什么解决办法吗?
我的大错。这段代码
container.Register(new MemoryCacheClient());
必须先打电话
Plugins.Add(new AuthFeature(() => new OzUserSession(), new IAuthProvider[] { new OzCredentialsAuthProvider(appSettings) }));
但 ServiceStackController 也会抛出有意义的异常(缓存无法解析),因为它具有缓存的依赖关系!