Differences between Application and Session Variables in ASP.NET

 

In Asp.Net, Application state is the instance of HttpApplicationState class which enables you to share the global information who are logged into your web application. That means all logged-in users shares the same data with Application variables.

 

Whereas Session variables are specific to particular user. Session state is derived from HttpSessionState class. Whenever a new user is logging to out Asp.Net web application asp.net automatically creates a new session ID which by defaults in 20 minutes. That means if there are 10 users are logged into your web applications means 10 sessions are created.

 

Application variables contains same data for all users whereas session variables contains different data for different users. Irrespective of the number of users logged in Application variables will be same whereas session variables are equivalent to the number of users logged in to your Asp.Net Web application.

Difference between Application and Session as shown below.