session验证-使用filter过滤器

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了session验证-使用filter过滤器相关的知识,希望对你有一定的参考价值。

public override void OnActionExecuting(ActionExecutingContext context)
        {
            string test = context.Controller.ToString();
            if (ValuesController._flag == 0)
            {
                context.Result = new RedirectResult("/api/values/Test");
                ValuesController._flag = 1;
            }
        }

学习博客:http://www.cnblogs.com/niklai/p/5676632.html

http://www.cnblogs.com/wangrudong003/p/5750583.html

以上是关于session验证-使用filter过滤器的主要内容,如果未能解决你的问题,请参考以下文章