Forgive me if this is a dumb question I am a newbie at asp coming from a strict desktop background. I am having an issue with users some how overriding a previous user's session on my web forms asp.net app. I created a small mobile phone web app to allow the 3 guys here at work to be able to punch in and out on their smart phones but if user A punches in and user B punches in right after then user A will see user B's punches if they refresh their phone. Furthermore if user A decides to punch out he will actually end up punching out user B. I have heard the term user state being tossed around but I thought asp.net handled that automatically? It seems to me that the server is only running one session at a time. How can I keep unique sessions running for my users?
I was under the impression that the server ran different "sessions" or "appdomains" or "instances" if you will, for each user who visited it.
No, that's not the case. ASP.NET does support sessions, but not in that way. You should look at HttpContext.Session instead, which helps you to keep track of session-based state.
See also "ASP.NET Session State Overview" for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With