Cookies and Session state

Source: Internet
Author: User
Cookie|cookie
BS development, these two concepts are essential, first to a general understanding, no practical application is difficult to in-depth, in-depth look at the reference address!
What is a Cookie?
A Cookie is a small piece of textual information that accompanies the user request and the page is passed between the WEB server and the browser. Each time a user accesses a site, the WEB application can read the information that the Cookie contains. The basic principle of cookies
If the user accesses a page on the site again, when the user enters a URL www.contoso.com, the browser looks for a Cookie associated with the URL on the local hard disk. If the cookie exists, the browser sends it to your site with a page request. The most fundamental use of cookies is to help the WEB site keep information about visitors. More generally, cookies are a way to keep Web application continuity (that is, to perform state management). Make your Web site remember you. What are session sessions?
When a user visits your site, the server creates a unique session for that user, and the session continues until the end of the user's access. What is a session ID and what is it for?
ASP.net needs to be able to track the session ID of each user in order to map the user to session state information on the server. By default, ASP.net uses a non permanent Cookie to save session state. Disable browser cookies what happened?
However, if the user disables the browser's cookie, session state cannot use cookies to hold the session ID, and session state will not work. There is no session state without cookies. Asp. NET's request object where



Reference address
Http://www.microsoft.com/china/MSDN/library/archives/library/dv_vstechart/html/vbtchaspnetcookies101.asp
http://support.microsoft.com/default.aspx?scid=kb;en-us;307598



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.