Floating FB popout byF5debug

Interview Questions and Answers on .Net Framework, OOPS, ASP.Net, C#.Net, SQL Server, WCF Series – Part 21


Question 201 - What are the Advantages of Session?

  • 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.

Question 202 - What are the Disadvantages of Session?

  • 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.

Question 203 - What is an In Proc Mode of storing sessions?

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.

Question 204 - What are the Advantages of InProc Sessions?

  • 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.

Question 205 - What are the Disadvantages of InProc Sessions?

  • 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.

Question 206 - What is a State Server Mode of Storing Sessions?

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).

Question 207 - What are the Advantages of State Server Session?

  • 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.

Question 208 - What are the Disadvantages of State Server Session?

  • Process is slow due to Serialization and De-Serialization
  • State Server always need to be up and running.

Question 209 - What is a SQL Server Mode of Storing Session?

  • 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.

Question 210 - What are the Advantages of SQL Server mode Session?

  • 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.

About Author: Karthikeyan Anbarasan, Microsoft MVP (Most Valuable Professional) in ASP.NET/IIS Architecture. He is the Founder and Chief Editor of the www.f5debug.net website and has authored books on Windows Phone and Business Intelligence(SSIS). He is also a Passionate Speaker and a Blogger on Microsoft Technologies.

You can Join Me On: Facebook, Twitter, Google Plus, LinkedIn

Comments (1) -

Vishal Shinde
Vishal Shinde
7/18/2013 6:23:09 AM #

Its really good blog i never seen such kind of topic explanation ever in net.........

Add comment

  Country flag

  • Comment
  • Preview

Recent Posts

Random Posts

Most Viewed

URL Shortner

Create your own short urls!!!

Site Counter

free counters


This is a personal weblog. The opinions expressed here represent my own and not those of my employer. For accuracy and official reference refer to MSDN/ TechNet. I have documented my personal experience on this blog.

Protected by Copyscape Web Plagiarism Finder

Site Meter