Asp.net web api owin katana OAuthorizationServerProvider中的会话
我正在使用Microsoft.Owin.Security.OAuth.OAuthAuthorizationServerProvider发布访问令牌。在GrantResourceOwnerCredentials方法中,我需要可用的会话来处理我这边的一些逻辑。由于它不可用-它是REST web api,我在Global.asax中设置如下:Asp.net web api owin katana OAuthorizationServerProvider中的会话,asp.net-web-api,owin,katana,Asp.net Web Api,Owin,Katana,我正在使用Microsoft.Owin.Security.OAuth.OAuthAuthorizationServerProvider发布访问令牌。在GrantResourceOwnerCredentials方法中,我需要可用的会话来处理我这边的一些逻辑。由于它不可用-它是REST web api,我在Global.asax中设置如下: protected void Application_PostAuthorizeRequest() { HttpContext.C
protected void Application_PostAuthorizeRequest()
{
HttpContext.Current.SetSessionStateBehavior(SessionStateBehavior.Required);
}
在此之后仍然为空。我必须做什么才能在这里启用会话