what is the difference between in application and a session state
Loading
what is the difference between in application and a session state
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Aman GuptaPosted Sep 28, 2024, 2:45 PM
Hi Shivam,
In .NET, Application State and Session State are two ways to manage data on the server-side, but they serve different purposes and have different scopes and lifetimes:
Example:
2. Session State
Example:
When to use each:
Application State: When you need to store data that is the same for all users, such as application-level settings.
Session State: When you need to store data specific to an individual user’s interaction with the application, such as login information or user-specific preferences.