Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

in IIS, what's the difference between "application" and "session"?

A Session is per browser (determined via cookies), but when does an "Application" start, and end, and how does IIS know know when a request is a part of the same same "Application" instance (if not done via cookies the same way that sessions are)?

like image 881
Alexander Bird Avatar asked Nov 21 '08 04:11

Alexander Bird


People also ask

What is the difference between application and session?

A session is usually for a user and only lasts from when they login to when they logout (or get timed out). Application State has a much longer lifetime, is shared between all users, and is only cleared when the process is restarted.

What is the difference between application and session variable?

application variable creates only one memory for one variable and for all user . while session creates one memory for one variable for one user :) Application variable will be maintained like global variable.

What is IIS session?

Session state is a means by which Internet Information Services (IIS) 7 stores information about each unique client session. For example, if your Web site has a shopping cart application, the contents of each client's shopping cart can be stored in session state.

What is difference between cookies and session?

Cookies are client-side files that are stored on a local computer and contain user information. Sessions are server-side files that store user information. Cookies expire after the user specified lifetime. The session ends when the user closes the browser or logs out of the program.


1 Answers

"Application" scope is global, and every request to a website shares the same application. Anything stored in the application is visible to all users. The application starts when the first request to the website is made, and ends when IIS stops the website (for example, when IIS itself is shut down, or when the website hasn't been accessed in a while).

like image 81
Sean Reilly Avatar answered Sep 28 '22 00:09

Sean Reilly