Flashcards in Design the application architecture - Objective 1.4: Configure state management Deck (27)
What 6 places can you store state information in an ASP.Net MVC application?
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,?
How do you configure IIS to support a custom session state provider?
1. Open IIS Manager and navigate to the web site.
2. In Features View, double-click Session State.
3. On the Session State page, in the Session State Mode Settings area, click Custom.
4. 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?
In ASP.Net, which class is used to write outgoing cookies on the server?
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.
Given this url - http://www.microsoft.com/?id=20
The query string is id=20.
In ASP.Net, which class is used to read the query string sent during a request?
Why should you not put personal or information that should be secure in the query string?
Query strings/URLs are not encrypted even over SSL.
Where is HttpContext.Items most commonly written to?
In HTTP modules, such as during the authentication phase of a request.
In ASP.Net, which class is used to read user profile information?
What must be configured in the web.config before ASP.Net user profiles can be used?
A membership and a profile provider
What is the maximum size cookies can be?
What is one advantage of using cookies over HTML5 web storage for maintaining state?
With cookies, no additional code needs to be written since cookies are automatically sent/received during requests.
sessionStorage and localStorage
What is the difference between HTML5 session storage and local storage?
Local storage persists after the browser closes. Session storage persists only while the window or tab is still open.
In ASP.Net, how do you determine the capabilities of the current user's browser?
Access the HttpRequest.Browser property which returns an HttpBrowserCapabilities object.
Test the window object for the presence of the localStorage or sessionStorage properties.