ASP. NET Session implementation principle analysis, asp. netsession

Source: Internet
Author: User

ASP. NET Session implementation principle analysis, asp. netsession
Analysis of ASP. NET Session implementation principles

When a user submits a request to the server, the server assigns each user a SessionId, which is stored in Cookies of the user's browser. The SessionId is global, that is, as long as the Cookies still exist, the server considers this as the same user, so that each user has its own global Session domain. When the user sends the Cookie of this SessionID to the server in the http header, the server will find the SessionID if it finds it. This proves that the user's status exists.

 

We can clear sessions through the following experiments:

 

Click the button to return the page, but the output is still the same SessionId

The SessionId saved by the server on the client for this user in the Cookies of the browser, the server uses this SessionId as the key to search for the Session domain of this user in the Session of the server.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.