Click here to Skip to main content
13,297,266 members (71,404 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I have the following problems:

I am developing an application in Asp.Net 4.0 under C# 4.0. When a user logs into the application using, let's say a browser "tab" and another user logs into the same application using another 'tab', one of the tabs will change immediately its content (users data) into the other tab's. It is very frustrating and any help/ solution to handle this would be WELCOME.
Posted 25-Dec-12 10:40am
Updated 25-Dec-12 10:45am
Oleksandr Kulchytskyi 25-Dec-12 16:01pm
Ouch , could you please explain for which purposes you allow log in process in two different tabs of the same application??
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Although I can't figure out what your purpose is, consider followings:
- cookies are linked to domains, thus if you use cookie based authentication and/or session, you can not separate the logins between tabs not even between browser instances (with one exception: due to it's purposes, "private" or "incognito" browser sessions are totally separated from the normal ones)
- thus if you want to be able to separate logins as you wrote, you have to disable cookies for session and authentication, see:[^],[^],[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Two things you can do:

1) Prevent the user from opening a new tab for your application. For this search google for "preventing multitab browsing of application". There are a number of ways, one which is good is using javascript which uses window name.

2) Enable cookieless session. This will make your URL look ugly but will let you use multiple tabs for different users without any clash of session ids.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171207.1 | Last Updated 26 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100