Forums » .NET » ASP.NET »

Difference between Session object and Application object in asp.Net.


Posted Date: 11 Feb 2009      Posted By:: Tanu R     Member Level: Bronze    Member Rank: 0     Points: 1   Responses: 6



Difference between Session object and Application object in asp.Net.



Responses

#345805    Author: moturi       Member Level: Gold      Member Rank: 2205     Date: 11/Feb/2009   Rating: 2 out of 52 out of 5     Points: 2

Session id can be created individually for individual clients,so for each client there will be a seperate session id

For Application objects we can use globally....means there is only one application id will be created


 
#345810    Author: Babu Akkandi      Member Level: Gold      Member Rank: 56     Date: 11/Feb/2009   Rating: 2 out of 52 out of 5     Points: 3

Hi,

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 for any user

Hope it Helps!

Thanks and Regards,
Babu Akkandi


 
#345833    Author: Pradeep M      Member Level: Silver      Member Rank: 1418     Date: 11/Feb/2009   Rating: 2 out of 52 out of 5     Points: 3

The Main difference is

Session variables are used to store user specific information where as in application variables we can't store user specific information.

Default lifetime of the session variable is 20 mins and based on the requirement we can change it.

Application variables are accessible till the application ends.





 
#345871    Author: Kushal      Member Level: Silver      Member Rank: 0     Date: 11/Feb/2009   Rating: 2 out of 52 out of 5     Points: 5

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

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.

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.


 
#346988    Author: LOGESHWARAN      Member Level: Gold      Member Rank: 0     Date: 13/Feb/2009   Rating: 2 out of 52 out of 5     Points: 4

Session variables are used to store user specific information where as in application variables we can't store user specific information.

Default lifetime of the session variable is 20 mins and based on the requirement we can change it.

Application variables are accessible till the application ends.
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.

REGARDS
LOGESHWARAN.P
mailto: logesh_ajax@logeshwaran.co.cc


 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : Show Previous page History
Previous : make selected text in the textbox to bold using c#
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages

Subscribe to Subscribers
Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Talk to Webmaster Tony John

Online Members

Raju
More...
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India