Base solution for your next web application
Open Closed

Session Sharing between Public and Mvc app [AspNet Core 2.2] #6682


User avatar
0
huntethan89 created

In AspNet MVC template, we only have one Web project. User only have to login once and sessions is preserved in public and Mpa Area.

However in AspNet Core + jQuery template, Public and Web projects are different. How session sharing will work in this case?


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    Can you talk about the usage scenario of the shared session?

  • User Avatar
    0
    alper created
    Support Team

    aspnet core stores session in a cache IDistributedCache. how about using persisting this to Redis, SQL Server etc.. Search for "Distributed caching in Asp Net Core" Here are some guidance:

    • https://docs.microsoft.com/en-us/aspnet/core/performance/caching/distributed?view=aspnetcore-2.2
    • https://joonasw.net/view/redis-cache-session-store
    • https://medium.com/@LuizAdolphs/asp-net-core-distributed-session-with-redis-8ce8bacf26cd