Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
I m umesh.I want to know that what is actual diff between application and session state in asp.net.
pls give me some demo.
Posted 31-Mar-11 23:59pm
Edited 1-Apr-11 0:00am
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You don't need a demo, you need to do research... MSDN[^]
  Permalink  
Comments
Shahriar Iqbal Chowdhury at 29-May-12 4:06am
   
Good reference , my 5
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Application state will be available to all users of the application when set
Basically user A sets application variable "AppID" to "myApp"
User B retrieves application variable "AppID" and reads "myApp"
 

 
Session state will only be available to a specific user of the ASP.net application
 
User A sets session variable "UserID" to "2"
User B loads the session variable "UserID" and receives null
User A loads the session variable "UserID" and receives "2"
  Permalink  
Comments
anbujeremiah at 2-May-13 22:32pm
   
can u please explain / give example for User A , User B
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

The main difference is that application is common for the whole application and session is different for different user,other wise both are same
 
Application["samp"] = "something";
Session["samp"] = "something";
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

Session state is unique to the client
 
where as
 
Application state is sharable among the clients
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Quick'n'dirty answer:
 
Application State has scope throughout the application whilst Session State only has scope within the current session.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 7

Session variable are only available at the user level means no user can access the other user session variables.
 

Application variable is available at application level means every user of the application can access the same application variable.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 8

i am giving you a link it will give you brief idea of caching concept
 
Exploring Session in ASP.NET[^]
 
best of luck!
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 280
1 Maciej Los 280
2 BillWoodruff 240
3 Afzaal Ahmad Zeeshan 239
4 Sergey Alexandrovich Kryukov 195
0 OriginalGriff 6,499
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,193
3 Manas Bhardwaj 4,657
4 Maciej Los 4,120


Advertise | Privacy | Mobile
Web03 | 2.8.1411019.1 | Last Updated 29 May 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100