MVC5过虑器的参数类型变成httpActionContext了,但是这个类型找不到session了,怎么办
public class LoginCheckFilterAttribute : ActionFilterAttribute
{
public override void OnActionExecuting(HttpActionContext actionContext)
{
base.OnActionExecuting(actionContext);
actionContext.HttpContext
}
}
原来MVC4 是ActionExecutingContext类型还能获得Session的,MVC4到MVC5f过虑器重写了,原来session怎么用