- It helps to maintain user states and data to all over the application.
- It can easily be implemented and we can store any kind of object.
- Stores every client data separately.
- Session is secure and transparent from user.
- Performance overhead in case of large volume of user, because of session data stored in server memory.
- Overhead involved in serializing and De-Serializing session Data, because In case of State Server and SQL Server session mode we need to serialize the object before store.
In this mode Session, state is stored in the memory space of the Aspnet_wp.exe process. This is the default setting. If the IIS reboots or web application restarts then session state is lost.
- It store Session data in memory object of current application domain. So accessing data is very fast and data is easily available.
- There is not requirements of serialization to store data in InProc Session Mode.
- Implementation is very easy, just similar to using View State.
- If the worker Process or application domain recycles all session data will be lost.
- Though its fastest, but more session data and more users can affects performance, because of memory.
- we can’t use it in web Garden scenarios .
- This session mode is not suitable for web farm scenarios also.
In this mode Session state is serialized and stored in a separate process (Aspnet_state.exe); therefore, the state can be stored on a separate computer (a state server).
- Its keeps the data separate from IIS so, any Issue with IIS does not hamper Session data.
- It is useful in web farm and web garden scenarios.
- Process is slow due to Serialization and De-Serialization
- State Server always need to be up and running.
- In this mode Session, state is serialized and stored in a SQL Server database.
- SQL Server Session mode is more reliable and secure session state management.
- Its keeps data in a centralized location (database).
- We should use SQL server session mode when we need to implement Session with some more security.
- If there happens to be frequent server Restart we can implement SQL server.
- This is perfect mode that fits in web farm and web garden scenarios (I have explained in details later).
- we can use SQL server Session mode when we need to share session between two different application.
- Session data do not affected if we restart the IIS.
- It is the most reliable and secure session management.
- It keeps data located centrally, It can be easily accessible from other application.
- It is very useful in web farm and web garden scenarios.
Disclaimer – F5debug Interview Questions & Answers Series:
You may recopy extracts from these pages (“the material”) to individual third party websites or to any intranet websites, but only if:
You acknowledge www.f5debug.net as the source of the material. Such acknowledgment should include reference to www.f5debug.net in the copy of the material and should also include “© Karthikeyan Anbarasan, www.f5debug.net “. You inform the third party that these conditions apply to him/her and that he/she must comply with them.