Answer:
The advantages of using session state are:
• It is easy to implement and is just similar to using View State.
• Accessing of data is very fast as it stores session data in memory object of the current application domain.
• It ensures platform scalability and it works in the multi-process configuration.
• Also it ensures data durability, since the session state retains data even if ASP.NET work process restarts (in outproc session).
The disadvantages of using session state are:
• As the session state data is stored in server memory, it is not advisable to use session state when you are working with large sum of data.
• With the use of Session state, it will affect the performance of memory, because session state variable stays in memory until you destroy the state.
• If the worker Process or application domain recycles all session data will be lost.
• We can't use it in web Garden scenarios and is not suitable for web farm scenarios also.
Asked In: Many Interviews |
Alert Moderator