Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In web terms, a Session is a visit to a website by a user, which may encompass several page-views and interactions as the user navigates around the site. Choices made by the user and any entered data can be saved during the Session and redisplayed or used to tailor the user experience accordingly during the Session. The key thing is that a Session represents a set of <em>interactions</em> between the user and the site, rather than being a simple run of served static pages. Sessions are only expected to last for a short period of time; if a user stops making requests to the site, after a few minutes the Session is considered to be over.</p> <p>HTTP is stateless, so in terms of the relationship between browser and web server, sessions don't exist as a <em>physical</em> entity.</p> <p><em>Logically</em>, ASP.NET simulates a session by recognising a user's recurring calls to the site, and preserving session state information between calls. </p> <p>It does this by assigning a unique token (the 'Session ID') to each user in a cookie when the user first calls the site. Every subsequent time the user calls the site, they present the cookie. ASP.NET recognizes it and calls up any persisted session data for that token from the persistence medium (ASP.NET stores it on the server-side, either in memory, in a state server, or in a SQL database). The application can read and modify session data during the lifetime of the HTTP request, usually in response to the user's actions. At the end of the request, the session data is returned to the persistence medium.</p> <p>In this way the illusion of an open, continuous session is preserved. The start of the session is easy to judge - it's the first time the user is provided with a token, and a session record stored in the persistence medium with a time-stamp. There is no simple answer regarding when exactly the session ends, because HTTP is naturally stateless. Therefore we have to assume that the session should be closed when a given amount of time has passed without the user returning to the site. This can only be enforced either by cookie expiration or by deletion of the session record from the persistence medium by comparison with timestamps on the session data, using an arbitrary timeout of our choice. The default in ASP.NET is 20 minutes. </p> <p>An interesting point is that when using SQL Server as ASP.NET's session persistance medium, it uses a scheduled SQL Server Agent task to clear out expired sessions. However, if Agent is not running, or not supported (e.g. in the case of SQL Server Express edition), then expired sessions are not cleared and therefore sessions will not end as long as the user keeps presenting the same session token. In practice, the session will end when the user closes their browser, because the cookie <em>should</em> then be discarded automatically.</p> <p>To answer your specific question however, notice I have been talking about sessions in the context of the application server (ASP.NET). The web server (IIS) has no notion of sessions at all - the only part it plays is in the serving and reading of cookies as it passes requests to ASP.NET.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload