Redis Session stopped working in SharePoint Online Add-In

%3CLINGO-SUB%20id%3D%22lingo-sub-1137390%22%20slang%3D%22en-US%22%3ERedis%20Session%20stopped%20working%20in%20SharePoint%20Online%20Add-In%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1137390%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%20-%20On%20Sunday%2026th%20our%20Provider%20Hosted%20SharePoint%20add-in%20suddenly%20stopped%20working%20and%20can%20no%20longer%20use%20Azure%20REdis%20Cache%20for%20session.%20Nothing%20has%20changed%20in%20the%20app%20for%206%20months.%20We%20can%20no%20longer%20use%20HttpContext.Current.Session%20as%20it%20loses%20its%20data%20in%20any%20postback.%20Any%20ideas%20what%20happened%20or%20how%20to%20fix%3F%20Using%26nbsp%3BMicrosoft.Web.RedisSessionStateProvider%204.0.1%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1165627%22%20slang%3D%22en-US%22%3ERe%3A%20Redis%20Session%20stopped%20working%20in%20SharePoint%20Online%20Add-In%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1165627%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3Ehi%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3Esimilar%20problem%20here.%20Do%20you%20have%20a%20solution%3F%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3Euli%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1166080%22%20slang%3D%22en-US%22%3ERe%3A%20Redis%20Session%20stopped%20working%20in%20SharePoint%20Online%20Add-In%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1166080%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F552747%22%20target%3D%22_blank%22%3E%40Uboddenberg%3C%2FA%3E%26nbsp%3BYes%20we%20had%20to%20remove%20all%20HttpContext%20Session%20and%20replace%20with%20StackExchange.Redis%20Cache%20as%20the%20session.%20Using%20unique%20keys%20for%20each%20user%20as%20cache%20is%20shared.%20So%20we%20removed%26nbsp%3B%3CSPAN%3EMicrosoft.Web.RedisSessionStateProvider%20completely.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi all - On Sunday 26th our Provider Hosted SharePoint add-in suddenly stopped working and can no longer use Azure REdis Cache for session. Nothing has changed in the app for 6 months. We can no longer use HttpContext.Current.Session as it loses its data in any postback. Any ideas what happened or how to fix? Using Microsoft.Web.RedisSessionStateProvider 4.0.1

 

Thanks!

2 Replies

hi

 

similar problem here. Do you have a solution?

 

uli

@Uboddenberg Yes we had to remove all HttpContext Session and replace with StackExchange.Redis Cache as the session. Using unique keys for each user as cache is shared. So we removed Microsoft.Web.RedisSessionStateProvider completely.