Wednesday 21 August 2013

Avoid sharing of same session across multiple tabs using asp.net

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.

When open different tabs, those tab will share same session if user access same web app in different tabs. same as sign out process also.

this is normal behavior of browser (shared single session on multiple tab).

Tab based browser – session handling

if you need each tab will get unique ID and it will looks like it is another visitor, try this code

<configuration>
  <system.web>
    <sessionState cookieless="true"
      regenerateExpiredSessionId="true" />
  </system.web>
</configuration>

19 comments:

  1. It doesn't run with relative path or "/" when it means "/default.aspx"

    ReplyDelete
  2. Not working form me.
    What I do:
    1.- OPen my web app
    2.- Log in
    3.- Copy URL
    4.- Open new tab
    5.- Paste URL.

    And continues logged in, and I dont want to continue loged in in the new tab.

    Any ideaS?

    ReplyDelete
  3. why u post such a nonsense things

    ReplyDelete
  4. Nice tips. Very innovative... Your post shows all your effort and great experience towards your work Your Information is Great if mastered very well.
    python training in velachery | python training institute in chennai



    ReplyDelete
  5. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.

    blueprism training in chennai | blueprism training in bangalore | blueprism training in pune | blueprism online training

    ReplyDelete
  6. You’ve written a really great article here. Your writing style makes this material easy to understand.. I agree with some of the many points you have made. Thank you for this is real thought-provoking content
    Java training in Tambaram | Java training in Velachery

    Java training in Omr | Oracle training in Chennai

    ReplyDelete
  7. The post is written in very a good manner and it entails many useful information for me. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept.

    devops online training

    aws online training

    data science with python online training

    data science online training

    rpa online training

    ReplyDelete
  8. These ways are very simple and very much useful, as a beginner level these helped me a lot thanks fore sharing these kinds of useful and knowledgeable information. c Software Testing Training in Chennai | Software Testing Training in Anna Nagar | Software Testing Training in OMR | Software Testing Training in Porur | Software Testing Training in Tambaram | Software Testing Training in Velachery

    ReplyDelete
  9. Worth reading! Our experts also have given detailed inputs about these trainings & courses! Presenting here for your reference. Do checkout Python Training In Chennai & enjoy learning more about it.

    ReplyDelete
  10. I see the greatest content on your blog and I extremely love reading them.
    cyber security course in malaysia

    ReplyDelete