HttpContext.Session empty after app is published on Service Fabric cluster HttpContext.Session empty after app is published on Service Fabric cluster azure azure

HttpContext.Session empty after app is published on Service Fabric cluster


By default Session data is scoped to the node it runs on. In order to have a highly available (distributed) solution, you'd need to take the data and replicate it to other nodes.

Service Fabric Reliable Stateful Services and Actors have such mechanisms built in. You could use one of those to cache your (protected) access tokens. (and optionally serve as a gateway to O365)