user970503
user970503

Reputation: 173

How to avoid the session sharing between the tabs in IE8

when i open the new tab and copy my url it's should go the login page. but it's going to homepage itself without asking for login.

It seems like it's default IE8 behaviour, how to override this to not share the session between tabs or new window.

Please share if anybody has found the solution for this.

Upvotes: 1

Views: 1615

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038830

The reason this happens is because by default session and authenticated users are tracked by cookies. And cookies are shared between browser tabs. This is something that you cannot change (the fact that cookies are shared between browser tabs -> and it is the same between all browsers, not only IE). What you could change is the way you track authenticated users and the ASP.NET session.

So for the ASP.NET session:

<sessionState cookieless="UseUri" />

and for tracking authenticated users:

<forms loginUrl="~/Account/Login.aspx" timeout="2880" cookieless="UseUri" />

Now you will notice that some tokens will be appended to all urls of your application allowing to track session. And when you open a new tab a new session will be created because cookies are no longer used.

Upvotes: 2

Related Questions