ASP.NET All types (references)

xiaoxiao2021-03-05  20

ViewState: Page-level buffer, also disappears after the page disappears

Session: Session Cycle, established when new open pages, but if you jump from a page to another page, Session is reserved. If there are multiple dialog windows on a machine, there may be multiple sessions.

Cookie: Machine grade buffer, open window on a machine share a cookie, for example: we log in once, you can open multiple windows in the future, you can log in again.

Application: Server-level buffer, multiple machines open the server page, the Application, each machine is the same, and a machine changes it, then the value taken by other machines changes. But Application provides Lock, UNLOCK mechanism to prevent simultaneous modifications

Static variable: server level buffer, similar to Application, but no lock mechanism

转载请注明原文地址:https://www.9cbs.com/read-32708.html

New Post(0)