By default, the Session object of ASP + still depends on the Cookie,
Config. web file settings allow the Session object to no longer depend on the browser
(That is, even if the Cookie function of the browser is disabled
The object is still valid). The Setting method is to add it to config. web.
<Sessionstate cookieless = "true"/> as follows:
<Configuration>
<Sessionstate cookie = "true"/>
</Configuration>
Note: put the file under the IIS application.
After setting <sessionstate cookieless = "true"/>, browse
* Disable the Cookie function during aspx browsing: The result is as follows, which proves the Session.
The object does not depend on the Cookie of the browser any more:
Disable the Cookie function of the browser during the test.
When you enter the webpage for the first time, date = 0
When the webpage ends, date = 100
When you press to enter the webpage again, date = 100
When the webpage ends, date = 200
When you press to enter the webpage again, date = 200
When the webpage ends, date = 300
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