ServiceStack“会话"丢失? [英] ServiceStack 'session' missing?

查看:55
本文介绍了ServiceStack“会话"丢失?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对此不熟悉,并尝试学习有关 Pluralsight 的教程.简单的一行代码:

new to this and trying to follow a tutorial on Pluralsight. A simple row of code:

var trackedData = (TrackedData)Session[date.ToString()];

Session 用红色下划线,我没有成功摆脱它.当导师的鼠标悬停在课程上时,会显示以下提示.ServiceStack.CacheAccess.ISession Service.Session

has Session underlined with red and I have not succeeded in getting rid of it. When the tutor's mouse hovered over the session, following tip was displayed. ServiceStack.CacheAccess.ISession Service.Session

但不知何故我无法将其纳入解决方案.我已经安装了 ServiceStack、ServiceStack.Host.MVC、ServiceStack.Host.AspNet 等.

But somehow I couldn't get it into the solution. I have installed ServiceStack, ServiceStack.Host.MVC, ServiceStack.Host.AspNet and more.

推荐答案

在服务内部,动态无类型会话包被重命名为 base.SessionBag.

Inside a Service the dynamic untyped Session Bag was renamed to base.SessionBag.

这篇关于ServiceStack“会话"丢失?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆