Please enable JavaScript.
Coggle requires JavaScript to display documents.
70-486 1.4 State (State Management Tools (HttpContext.[Request|Responce]…
70-486 1.4 State
Session. Sessions are slightly different from cookies. Each user gets a session ID, which is sent back to the server for validation either by cookie or by GET variable.
-
-
-
HttpContext.[Request|Responce].Cookies - small snippets of information stored on client side (both request and response)
4096 bytes, stored on client side, can have a limited time span, cookie is sent back and forth
-
-
-
Set cookie:
-
AuthorizeAttribute
-
Match - This method determines if one Attribute equals another.
The Auto-Detect cookie mode causes cookies to be used if the mobile device profile supports cookies;
-
HttpRequest.QueryString - is passed as part of the complete URL string (request only); Example:
www.contoso.com/default.aspx?fullname=Fadi%20Fakhouri
string fullname1 = Request.QueryString["fullname"];
string fullname2 = Request["fullname"];
Context.Items - lasts only the lifetime of that request, share data between an IHttpModule interface and an IHttpHandler interface during an HTTP request.
MSDN:
Profile information is stored in a database by user name and can be accessed through HttpContext.Profile[“miscellaneousData”]. The profile is part of the Membership and Roles provider, and you need to configure a provider in the Web.config file. The use of a profile means you have to be using the ASP.NET membership provider because it is based on information stored in the membership.
User-specific, persisted (SQL Server), strongly typed object;
TempData - persist data from one request to another when using Redirect() and RedirectToAction(); Keep(string) marks the specified key in the dictionary for retention.
-
-
-
-
-
Http is a stateless protocol, each command is executed independently, without any knowledge of the commands that came before it.
-