My project structure in brief.
I have an Angular2 app, that calls WebApi, that calls code from another project say (CommonProj). CommonProj code is accessing session as below.
if (HttpContext.Current.Session[sessionKey] != null)
{
// code
}
but it gives me Null Reference error because HttpContext.Current is null. When this code is called from other place i.e. non api it works fine. My question is how to access HttpContext.Current in explained situation.