Hi
Can anyone Tell me? What is the exact difference between Application Object and Session Object?
Thanks in Advance
Application Object and Session Object
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jiteendra SampathiraoRank #585 · 4.1K reputationPosted Aug 15, 2011, 8:38 PM EDT
Application Object:
Application variables are the variables which remain common for the whole application…
Their value can be used across the whole application… And they die only when the application stops or probably when they are killed forcibily… The ideal example for these kind of variables are site counter… We can find out how many people accessed a particular site since the time it went live via application variables and incrementing the same on ever session start..
Session Object:
Session variables are variables which remain common for the whole application but for one particular user.
They also can be used across the whole application… But they die when a particular user session ends or probably
when they are killed forcibily… The ideal example for this kindof variable are user id… You might want to show "Welcome Vishal" on every page of your site till vishal logs off… So in session start you set a variable to "something" and kill it on session end… All these methods like session start, session end, application start, application end are found in global.asax and that's the reason global.asax is one for the whole ASP.Net application…
Hope it help you.....