V
V
Victor Pogor2015-07-12 13:59:57
ASP.NET
Victor Pogor, 2015-07-12 13:59:57

How to create a session in ASP.NET vNext?

Hello dear IT-specialists.
Not long ago I started learning ASP.NET and started right away with the most current version.
With the MVC 6 structure and how to work with this pattern, I understood.
So I created a form in the View with the First Name and Last Name fields, did the validation (synchronous for now) and if the user entered the correct data, then redirects him to another View.
I'm interested in the question: how to make a session (if I express myself correctly) so that when the user accidentally closes the site, he can immediately get to the second View (so that there is a redirect) and so that the session lasts only 20 minutes.
It seems to me that this will somehow be connected with Cookies and the check will be based on the IP from which they visited the site, but it is interesting that the session will be remembered in the database?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
evorios, 2015-07-15
@evorios

Here's the first link from Google:
www.mikesdotnetting.com/article/270/sessions-in-as...
Redirect is a regular redirect in the controller if the session exists and is valid.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question