"is working with the session thread-safe?" Code Answer


as always, the answer depends on what you mean by "safety." in asp .net, each request gets exclusive access to its session state. this means that you don't have to worry about synchronizing access within the scope of a single request. if session["user"] is non-null, then it will be non-null for the entire duration of the current request. in your example, request 1 will never throw a null reference exception.

By Gilles Radrizzi on February 4 2022

Answers related to “is working with the session thread-safe?”

Only authorized users can answer the Search term. Please sign in first, or register a free account.