I was just planning to implement a custom session state provider for a distributed cache product in .net core but I could not find SessionStateStoreProviderBase and related classes in dotnet core. Can somebody tell me where to find them?
Asked
Active
Viewed 2,351 times
2
-
Hi, did you manage to implement this? could you lead me with some example on how to create and plug a custom session state store provider in .net core? – acromm Oct 23 '19 at 14:01
-
@acromm please check out the accepted answer. Sessions have changed in .Net Core so you need to implement them differently now. – Haseeb Jadoon Oct 24 '19 at 01:15
2 Answers
2
Session is very different in ASP.NET Core. It's designed around IDistributedCache and takes the implementation from DI. https://github.com/aspnet/Caching/blob/rel/1.1.2/src/Microsoft.Extensions.Caching.Abstractions/IDistributedCache.cs

Tratcher
- 5,929
- 34
- 44
1
This is more relevant now: https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.session?view=aspnetcore-2.2
I believe you'll want to inject in your own ISessionStore for the SessionManager to pick up. SessionManager

ZagNut
- 1,431
- 15
- 20
-
Warning: Apparently they have removed this totally in asp.net 6! (At least there's no documentation for it) – Poul Bak May 19 '21 at 13:23