Click here to Skip to main content
15,881,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Scenario:
By default all browsers share session state between multiple tabs. So if you logged into one tab with particular site and open internal link of the same site in new tab, you need not to worry to login again. It will automatically declare you as logged in user.

For example, if I open google and login to google.com. Now I open new tab in the same browser and type gmail.com then it will automatically logged in me and redirect to google mail, here at this step it will not ask me to log in again.

Requirements:

If I am administrator of customer accounts in site. Now I am accessing account of customer “ABC” and then open new tab and access account of customer “PQR”. The session is now holding information for customer “PQR” and thinks that I am working on customer “PQR”. Now after working on customer “PQR”, I am coming back to customer “ABC” (tab) and start editing it. Actually according to session information it is assuming again that I am editing customer “PQR” and the problem starts here(data discrepancy).

So please let me know how i can create a unique session for every instance of browser ?
Posted

HTML
change the following config setting (Web.config file)

<sessionstate mode="InProc" cookieless="UseUri"></sessionstate>
 
Share this answer
 
Comments
sujitbhosale 11-Apr-12 7:43am    
Thanks but In our application, if I used this i get the error relted to logging and db connectivity.may be we use cookieless = false strictly.
Use the unique key from an account to store your data in the session.
 
Share this answer
 
AFAIK this is a function of the browser, which you have no control over. The user would need to initiate using the private browsing feature in some browser.

You may be able to work around it by placing a hidden control on the page that has different values to differentiate between requests.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900