1
在ServiceStack中,此行不正確。ServiceStack中的通用ServiceStackController對象空引用異常Mvc
userSession = this.Cache.Get(SessionKey); (Line:28)
調用此代碼時,緩存爲空。
我的生產網站現在壞了。
任何解決方案?
在ServiceStack中,此行不正確。ServiceStack中的通用ServiceStackController對象空引用異常Mvc
userSession = this.Cache.Get(SessionKey); (Line:28)
調用此代碼時,緩存爲空。
我的生產網站現在壞了。
任何解決方案?
我的大錯。此代碼
container.Register(new MemoryCacheClient());
必須調用之前
Plugins.Add(new AuthFeature(() => new OzUserSession(),
new IAuthProvider[] {
new OzCredentialsAuthProvider(appSettings)
}));
而且ServiceStackController拋出有意義的異常(緩存無法解析),因爲它依賴於緩存!