简体   繁体   中英

ASP.NET Session

ASP.Net会话对于不同的浏览器具有相同的价值。...为什么会这样?

如果通过不同的浏览器表示同一台计算机上的IE的两个实例,则答案是会话基于cookie(例如,会话ID存储在cookie中),并且同一浏览器的多个实例共享cookie。

A session only lives until the browser is closed.

So you either

  • set the value to be the same in differnt browsers

  • you are not using sessions

  • Retreive the session using an URL or cookie.

If you start the same browser twice, the second instance might use the same cookies as the first - so you get the same session. This is very browser dependent.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM