I am completely new to ASP.NET Core and DDD (domain-driven design). I recently purchased the ASP.NET Zero startup template to ease the pain and learning curve of getting started. I love the project, but I am having difficulty with session state.
I use third-party components in our application, like the Neodynamic products.
I need a way to pass the current session ID and protocol to several of these components from their respective controllers. In ASP.NET MVC, it was relatively easy with HttpContext.Session.Id and HttpContext.Request.Scheme. This seems to be a bit more confusing in ASP.NET Core.
Can someone get me started?
The
Microsoft.AspNetCore.Sessionpackage provides middleware for managing session state.Call
AddSession()andUseSession()in yourStartupclass:Reference: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/app-state