Multiple choice technology web technology

How does ASP.NET stores SessionID's default?

  1. In Cache

  2. In Cookies

  3. In A Global Variable

  4. In URL

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

ASP.NET stores SessionIDs in cookies by default, using a non-persistent cookie named ASP.NET_SessionId that identifies the user session across requests. The SessionID can be stored in the URL if cookieless sessions are configured, but cookies are the standard default mechanism.

AI explanation

By default, classic ASP.NET Web Forms stores the SessionID token in a client-side cookie (named ASP.NET_SessionId), which the browser sends back on every request so the server can map it to the corresponding server-side session state. This is the out-of-the-box behavior unless cookieless sessions are explicitly configured, in which case the SessionID gets embedded in the URL instead. 'In Cache' and 'In A Global Variable' describe how session data itself might be stored server-side in certain session-state modes, not how the SessionID identifier is transmitted/stored client-side, and 'In URL' is only the fallback for cookieless mode, not the default.