Session Management Flashcards

1
Q

What exactly is a session ?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain “HTTP is a stateless protocol” ?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are various way of doing session management ?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Are sessions enabled by default ?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to enable sessions in MVC core ?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Are sessions variables shared(global) between users ?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Do session variables use cookies ?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a cookie ?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain idle time out in sessions ?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does a Context means in HTTP ?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When should we use viewdata ?

A

To pass data from controller to view.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How to pass data from controller to view ?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

In same request can viewdata persist across actions ?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

ViewBag vs ViewData ?

A

ViewBag is syntatic sugar over viewdata.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does ViewBag work internally ?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Explain viewModels ?

A
17
Q

ViewBag vs ViewModel Whats the best practice ?

A
18
Q

Explain tempdata ?

A
19
Q

Can tempdata persist across action redirects ?

A
20
Q

How is tempdata different from viewdata ?

A
21
Q

If tempdata is read is it available for next request ?

A

NO

22
Q

How to persist tempdata ?

A

We can persist tempdata by calling the keep method.

23
Q

What does Keep do in tempdata ?

A

Keep method persist the data for the next request.

24
Q

Explain Peek in tempdata ?

A

Peek = Keep + Read. It will read as well as keep the data.

25
Q

How is tempdata different from session variables ?

A
26
Q

If i restart the server does tempdata,session stay ?

A

No, tempdata and session do not persist in server restarts.

27
Q

Is tempdata private to a user ?

A
28
Q
A