Session Management Flashcards
What exactly is a session ?
Session is user interaction which happens with a website over a period of time.Its interaction
which happens right when browser opens and browser closes.
Explain “HTTP is a stateless protocol” ?
What are various way of doing session management ?
Are sessions enabled by default ?
How to enable sessions in MVC core ?
Are sessions variables shared(global) between users ?
Do session variables use cookies ?
What is a cookie ?
Explain idle time out in sessions ?
What does a Context means in HTTP ?
When should we use viewdata ?
To pass data from controller to view.
How to pass data from controller to view ?
In same request can viewdata persist across actions ?
ViewBag vs ViewData ?
ViewBag is syntatic sugar over viewdata.
How does ViewBag work internally ?
Explain viewModels ?
ViewBag vs ViewModel Whats the best practice ?
Explain tempdata ?
Can tempdata persist across action redirects ?
How is tempdata different from viewdata ?
If tempdata is read is it available for next request ?
NO
How to persist tempdata ?
We can persist tempdata by calling the keep method.
What does Keep do in tempdata ?
Keep method persist the data for the next request.
Explain Peek in tempdata ?
Peek = Keep + Read. It will read as well as keep the data.
How is tempdata different from session variables ?
If i restart the server does tempdata,session stay ?
No, tempdata and session do not persist in server restarts.
Is tempdata private to a user ?