How to use session storage in ASP.Net Core
To store user-specific data in ASP.Net Core web applications, we utilize the session state. Nevertheless, utilizing session state in ASP.Net core is not uncomplicated—– a minimum of, session state in ASP.Net Core doesn’& rsquo; t work the method it utilized to operate in legacy ASP.Net applications. This post examines how we can deal with session state in ASP.Net Core.Create an ASP.Net
Core Web API project To begin with, let & rsquo;
s develop an ASP.Net Core task and set up the required packages. If Visual Studio 2017 is up and running in your system, follow the actions detailed listed below to develop an ASP.Net Core Web API project. Launch the Visual Studio 2017
- IDE. Click on File > New > Task.
- Select & ldquo; ASP.Net Core Web
- Application(. Net Core )& rdquo; from the list of templates displayed. Specify a name for the project. Click OK to save the task.
- Select & ldquo; API & rdquo; in the
- & ldquo; New.Net Core Web Application & hellip; & rdquo; window. Select & ldquo;.
- Net Core” & rdquo; as the runtime and ASP.Net Core 2.1 (or later on) from the drop-down list of controls at the top.
- Select “& ldquo; Web Application (Model-View-Controller)” & rdquo; as the task design template.
- Uncheck the “& ldquo; Enable Docker Support” & rdquo; box. Make sure that “& ldquo; No Authentication & rdquo; is chosen as we won’& rsquo; t be utilizing authentication here.
- Guarantee that “& ldquo; Configure for HTTPS” & rdquo; is untreated as we won’& rsquo; t need HTTPS either. (See the figure below.)
- Click OK.
This will develop a new ASP.Net Core 2.1 MVC project in Visual Studio 2017.
Released at Mon, 12 Nov 2018 11:00:00 +0000