Design the application architecture - Objective 1.4: Configure state management Flashcards
What 6 places can you store state information in an ASP.Net MVC application?
- Cache
- Session
- Cookies
- QueryString
- [Http]Context.Items
- Profile
What is the ASP.Net Cache?
A memory pool store on the server and shared across users
What is the ASP.Net Session?
A store on the server that is unique for each user
What are cookies?
Strings that are stored locally in the browser’s cache and are sent with each HTTP request to the server
What is the QueryString?
The part of the URL after the question mark
What is the HttpContext.Items?
A place to store data which is needed only for the lifetime of the request
What is ASP.Net profile?
User-specific information stored in a database which persists across multiple sessions
What is a major consideration of using ASP.Net Cache in a web farm?
Each server needs its own copy of the Cache since any individual request cannot be guaranteed to be sent to a specific server.
Which class must you inherit from to implement a custom session state provider in ASP.Net, for example, one that stores session in an Oracle database,?
SessionStateStoreProviderBase
How do you configure IIS to support a custom session state provider?
- Open IIS Manager and navigate to the web site.
- In Features View, double-click Session State.
- On the Session State page, in the Session State Mode Settings area, click Custom.
- Click Apply in the Actions pane.
What are cookies?
Small snippets of information stored on the client side that can persist across sessions and are individualized to a particular domain or subdomain.
When are cookies sent to and from a server?
They are sent to and from a server with every request and response.
In ASP.Net, which class is used to read incoming cookies on the server?
HttpContext.Request.Cookies
In ASP.Net, which class is used to write outgoing cookies on the server?
HttpContext.Response.Cookies
What is a query string?
Information passed as part of the URL. The query string part of the URL is any text after the question mark.
Ex:
Given this url - http://www.microsoft.com/?id=20
The query string is id=20.