How to set and get the session value in asp.net core.
The Microsoft.AspNetCore.Session package provides middleware for managing session state. Add the following heightened line in your Startup.cs public void ConfigureServices(IServiceCollection services) { services.AddMvc(); // Adds a default in-memory