Although ASP.NET shields a lot of complexity, when writing ASP.NET applications, we should always pay attention: our code always works in a multi-process and multi-thread operating environment. Therefore, we must be vigilant when dealing with static variables and global variables. At the same time, when we store things in the Session, we also need to consider whether the saved objects can cross process boundaries when the Session state is provided as an out-of-process service.
( Click on the image to enlarge )