简体   繁体   中英

How to prevent sharing user defined session in multiple tabs?

我想在同一浏览器的不同选项卡中以不同的用户身份登录。我想在每次登录时存储从Session [“id”]中的数据库中获取的用户ID。如何防止在多个选项卡中共享会话[“id]?

Generally browsers share session state between multiple tabs by default.You may try this code to avoid the sharing ie, try to have tab based browser – session handling:

<configuration>
  <system.web>
    <sessionState cookieless="true"
      regenerateExpiredSessionId="true" />
  </system.web>
</configuration>

You may also check how to prevent the two session on a single browser using asp.net

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