The major practical difference is that if you call Session.Abandon(), Session_End will be fired (for InProc mode), and in the next request, Session_Start will be fired. Session.Clear( ) just clears the session data without killing it.

Session A session is the time for which a particular user interacts with a web application. During a session the unique identity of the user is maintained internally. A session ends if there is a session timeout or user ends sessionby logging out.Sessions may change from user to user.

Cache Caching can be used to temporarily store page output or application data either on the client or on the server, which can then be re-used to satisfy subsequent requests and thus avoid the overhead of re-creating the same information.Caching is particularly suitable when you expect to Cache will be applicable to the entire application through out it's life cycle return the same information in the same format for many different requests.

Application Its nothing but similar to Session with a bit difference that is Session objects have scope within a particular session while application objects having scope within entire application. Application are accessible only from code running within the context of the originating application. Other applications running on the system cannot access or modify the values. (More...)

- View state is maintained in page level only.- View state of one page is not visible in another page.- View state information stored in client only.- View state persist the values of particular page in the client (browser) when post back operation done.- View state used to persist page-instance-specific data. (Read more)

Session State:

- Session state is maintained in session level.- Session state value is available in all pages within a user session.- Session state information stored in server.- Session state persist the data of particular user in the server. This data available till user close the browser or session time completes.- Session state used to persist the user-specific data on the server side. (Read more)

Application State

ApplicationState is a variable you can store values in during the life off the application (may get cycled periodically, and without your knowledge) (used less-frequently)

Usage

- If you want to access the information on different web pages, you can use SessionState- If you want to access from the same page, then you can use Viewstate-Application State it's global, for all users

Security

Session state provides more security when compared with view state as the data value is stored in server side (More...)

In some cases, using view state is not feasible. The alternative for view state is session state. Session state is employed under the following situations:. Large amounts of data - View state tends to increase the size of both the HTML page sent to the browser and the size of form posted back. Hence session state is used. . Secure data - Though the view state data is encoded and may be encrypted, it is better and secure if no sensitive data is sent to the client. Thus, session state is a more secure option. . Problems in serializing of objects into view state - View state is efficient for a small set of data. Other types like DataSet are slower and can generate a very large view state (More...)

The session Timeout is a sliding expiration time, meaning whever your page access session state, the expiration time will be moved forward. Please note that as long as a page has NOT disabled session state, it will access the session automatically when requested.

Session state, by default, won't work if a Web browser that supports cookies has cookies disabled. Application state isn't user-specific, though, and doesn't need to be tracked in cookies. Therefore, application state works regardless of cookies. (More...)

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.