webapi
在webapi 中,默认是没有开始Session的,需要在global.ascx中增加以下代码:
public override void Init() { this.PostAuthenticateRequest += (sender, e) => HttpContext.Current.SetSessionStateBehavior(SessionStateBehavior.Required); base.Init(); }