C# .NET Web Api 保存Session

    
Global.asax中添加:
     public override void Init() { this.PostAuthenticateRequest += (sender, e) => HttpContext.Current.SetSessionStateBehavior(SessionStateBehavior.Required); base.Init(); }

上图:

 

posted @ 2018-05-07 17:06  紫晶城  阅读(336)  评论(0编辑  收藏  举报