We can use session state to save and store user data while the user browses your web app. We already know that in previous versions of ASP.NET we can store session as key value pairs like this: “Session[“Name”] = “Rajeesh Menoth”” and Implement this in an easy way.But in the latest version of ASP.NET or ASP.NET Core, we need to make a few configurations for accessing and enabling session state in the application. The main purpose session is maintaining user data in the browser’s memory because HTTP is a stateless protocol.
We need to install the stable version of “Microsoft.AspNetCore.Session” from the Nuget Package Manager. Then only we can access session state in ASP.NET Core 1.1.