Google News
logo
ASP.NET - Interview Questions
What is the difference between session and application object in ASP.NET?
The difference between session and application object is that all users share one Application object and with sessions, there is one session object for each user. Data stored in the application object can be shared by all the sessions of the application.

Application object stores data in the key-value pair. Session object stores session-specific information and the information are visible within the session only. ASP.NET creates unique SessionId for each session of the application.

SessionIDs are maintained either by an HTTP cookie or a modified URL, as set in the applications configuration settings. By default, SessionID values are stored in cookies.
Advertisement