HttpContext Session is null
Closed this issue · 2 comments
I've implemented this code exactly as provided and am successfully authenticating against Azure Active Directory. I'm able to access the claims of the logged in user and see no issues there.
However, I'm getting an object reference exception when trying to use Graph in the SessionTokenCache.cs file where the httpContext.Session is null.
Why would this be? My web.config already contains runAllManagedModulesForAllRequests="true" in the modules section. I'm lost.
I'm not sure what is going wrong here, but could you try this sample and see if you run into the same trouble there? https://github.com/Azure-Samples/active-directory-dotnet-webapp-openidconnect-v2
The session token cache in this sample is based on the one in that sample.
Resolving for now. Please let us know if this problem continues, especially if it isn't repeatable in the samle from the Azure-Samples organization.