State the difference between a Session and an Application

Showing Answers 1 - 28 of 28 Answers

anithasri

  • Dec 20th, 2006
 

the session object is used to maintain the session of each user. If one user enter in to the application then they get seesion id if he leaves from the application then the session id is deleted.If they again enter in to the application they get different session id.

   But for application object the id is maintained for whole application.it doesn't differ

  Was this answer useful?  Yes

shree

  • Dec 24th, 2006
 

sessions allows information to be stored in one page and accessed in another,and it supports any type of object,including your own custom data types.

Application state allows you to store global objects that can be accessed by any client.

The coomon thing b/w session and application is both support the same type of objects,retain information on the server, and uses the same dictionary -based syntax.

  Was this answer useful?  Yes

roopali

  • Jan 11th, 2007
 

application state is a state where we hav the information that is global for the application,
where as
session state is a state which is maintained as a  per-client basis.
whenever a user first accesses a page a session id is generated by asp.net.
that session id is then transmitted between the client and the server via Http either  with the help of client-side cookies or encoded in a mangled sessions of  the urls.
so the next time the users accesses,state associated with that session id can be viewed or modified.

  Was this answer useful?  Yes

yv_harish

  • Feb 19th, 2007
 

Question is vague......It should be.......According to the answers poated
What is the difference between Session object and Application object?

  Was this answer useful?  Yes

Inturi

  • Sep 19th, 2008
 

1) Application object is created when first request comes to the web server related the web application. Inside the application sessions will be created.

2) Application variables are global. you can access across the sessions. where as the session variables are related to particular session only.

  Was this answer useful?  Yes

prasanth868

  • Aug 11th, 2009
 

Application state is global to the application regardless of the number of application instances. All instances share the same application state variables. Each instance has its own session variables. They are stored at the server end. One use of session is to store the user login status, its privileges, etc.

  Was this answer useful?  Yes

Application is global and initiated when the application is loaded for the first time and remains active till the application is terminated.

Session is for a particular user. It gets loaded when the user first accesses the application and remains active till time out set (i.e. the time set for the last used by user like end the session if the user does not access the page for 10 mins.)

  Was this answer useful?  Yes

@yv_harish  wat u said is not correct


the asker is focusing on some aspect and u r going onto another
he seems to be asking difference between session state and application state

Basically, in session state It allows you to store any type of data in memory on the server. The information is protected, because it is never transmitted to the client, and it’s uniquely bound to a specific session. Every client that accesses the application has a different session and a distinct collection of information. Instance of every user is different which is differentiated by a session ID

While in case of an application state, it allows you to store global objects that can be accessed by any client. That is the instance for every user is same.

  Was this answer useful?  Yes

sumangala

  • Sep 8th, 2011
 

Application State : 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 State: Session State stores session-specific information and the information is 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 application’s configuration settings. By default, SessionID values are stored in a cookie.

  Was this answer useful?  Yes

Anna

  • Oct 20th, 2011
 

Application State - Stored on the server and shared for all users. Does not expire. Deprecated by Cache .

Session State - Stored on the server. Unique for each user. Can expire.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions