You must Sign In to post a response.
  • Category: ASP.NET

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

    Difference between Session object and Application object in asp.Net.
  • #345805
    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
    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
    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
    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
    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


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.