Objective 1.4: Configure state management Flashcards

1
Q

In an ASP.NET MVC 4 application, state information can be stored in the following locations:

A

■■Cache, which is a memory pool stored on the server and shared across users
■■
Session, which is stored on the server and unique for each user
■■
Cookies, which are stored on the client and passed with each HTTP request to the server
■■
QueryString, which is passed as part of the complete URL string
■■
Context.Items, which is part of the HttpContext and lasts only the lifetime of that request
■■
Profile, which is stored in a database and maintains information across multiple sessions

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

Caché objects

A

It is in-process in that although it goes across all users and pages, it is confined to that particular application domain on an individual server.

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

SessionStateStoreProviderBase

A

this class enables you to create your own session provider to support situations in which the default session store is inadequate

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

Cookies

A

Cookies are small snippets of information stored on the client side and can persist across sessions. They are individualized to a particular domain or subdomain, so with careful planning you can use cookies across a web farm

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

QueryString

A

A query string is information that can be used by only one user. Its lifetime is by request unless architected to be managed differently.

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

How the query string data can be accessed?

A

You can access the data in the HttpContext.Request.QueryString[“attributeName”] on the server and from the client side by parsing window.location.href.

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

Context.Items

A
Context.Items contains information that is available only during a single request.
Typically, it is used to add information to the request through the use of an HTTP module in which you can add some information to the request that will be available to the other modules and to the handler.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly