2

I want to login as different users in different tabs of same browser.And I want to store user id,taken from database in Session["id"] on each login.How to prevent sharing of session["id] in multiple tabs?

Midhuna
  • 4,523
  • 4
  • 21
  • 22

1 Answers1

4

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

KyleMit
  • 30,350
  • 66
  • 462
  • 664
Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331