application state is a state where we hav the information
that is global for the application,
session state is a state which is maintained as a
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.
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.
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.
Application state is a global storage Mechanism that is accessible from all pages in the web application.
Session State is similar to application state, except that it is scoped to the current browser session. If different users are using your application each user session will have a different session state.
In addition, if a user leaves your application and then returns later, the second user session will have a different session state from the first.
Both application and session state is useful for storing information that needs to be maintained between server roundtrips and between requests for pages.