Static Session Class and Multiple Users

后端 未结 3 1936
轮回少年
轮回少年 2020-12-30 13:37

I am building a class to store User ID and User Role in a session. I\'m not sure how this class will behave when multiple users are on the site at the same time. Does anyone

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-30 14:06

    The code you posted is the exact replica of some code we have here.

    It has been working fine for 2 years now.

    Each users access is own session. Every request made to the server is a new thread. Even though 2 request are simultaneous, the HttpContext.Current is different for each of those request.

提交回复
热议问题