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,273
  • 4
  • 19
  • 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
  • 35,223
  • 60
  • 418
  • 600
Rahul Tripathi
  • 161,154
  • 30
  • 262
  • 319