I realize session and REST don\'t exactly go hand in hand but is it not possible to access session state using the new Web API? HttpContext.Current.Session
is a
one thing need to mention on @LachlanB 's answer.
protected void Application_PostAuthorizeRequest()
{
if (IsWebApiRequest())
{
HttpContext.Current.SetSessionStateBehavior(SessionStateBehavior.Required);
}
}
If you omit the line if (IsWebApiRequest())
The whole site will have page loading slowness issue if your site is mixed with web form pages.