Search code examples
c#asp.netsession-timeout

ASP.net session issue with localhost


I have an issue with sessions. My web site is implementing a logged users console, which register a new user each time it logs in. If I try to open 2 pages within the same web explorer, it fails because the method first ask if the user is already connected for not registering it twice.

This method take as parameter the sessionID, which is provided by .net My question is: In the same browser (or in the same computer, localhost), the sessionID it's always the same or when is it generated?


Solution

  • SessionID will be the same for the same browser.
    On a different browser (or a different computer) you'll get a different SessionID.

    Thats kinda how it is all over the internet, not just with asp.net, because of the way Cookies work.

    For example you'll notice that you can't log into amazon or ebay using different accounts within the same browser.