Explain in-proc,out-proc and sql server.

Answer Posted / sajid

In case of InProc, state is maintained within the managed
memory of the ASP.NET process whereas in case of OutProc
mode session is managed by an external resource (
StateServer or SQL Server )
In case of InProc, state is maintained within the managed
memory of the ASP.NET process whereas in case of OutProc
mode session is managed by an external resource (
StateServer or SQL Server )


This EggheadCafe article -
http://www.eggheadcafe.com/articles/20021016.asp has a good
comparison

Storage location

* InProc - session kept as live objects in web server
(aspnet_wp.exe). Use "cookieless" configuration in
web.config to "munge" the sessionId onto the URL (solves
cookie/domain/path RFC problems too!)
* StateServer - session serialized and stored in memory
in a separate process (aspnet_state.exe). State Server can
run on another machine
* SQLServer - session serialized and stored in SQL server

Performance

* InProc - Fastest, but the more session data, the more
memory is consumed on the web server, and that can affect
performance.
* StateServer - When storing data of basic types (e.g.
string, integer, etc), in one test environment it's 15%
slower than InProc. However, the cost of
serialization/deserialization can affect performance if
you're storing lots
of objects. You have to do performance testing for
your own scenario.
* SQLServer - When storing data of basic types (e.g.
string, integer, etc), in one test environment it's 25%
slower than InProc. Same warning about serialization as in
StateServer.

Robustness

* InProc - Session state will be lost if the worker
process (aspnet_wp.exe) recycles, or if the appdomain
restarts. It's because session state is stored in the memory
space of an appdomain. For details, see KB324772.
* StateServer - Solve the session state loss problem in
InProc mode. Allows a webfarm to store session on a central
server. Single point of failure at the State Server.
* SQLServer - Similar to StateServer. Moreover, session
state data can survive a SQL server restart, and you can
also take advantage of SQL server failover cluster, after
you've followed instructions in KB 311029.

Is This Answer Correct ?    73 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the difference between an application and a program?

788


how can we achieve language interoperability through CLS? How MSIL works?

848


Explain some of the disadvantages due to microsoft.net?

754


How to improve the cache performance? : .NET Architecture

743


what is sessions and cookies take one example simple way to understand

2083


Explain the number or character entered through keyboard gets converted to equivalent ascii code & it get stored on ram in the binary form. What is the exact procedure. : Dot net architecture

751


What do you know about machine.config file ?

747


Explain cache memory? : Dot net architecture

724


What are the different pipelining hazards? : Dot net architecture

804


what is inheritancy where u required ?

1741


what is the difference between master page and content page?

2350


What is a clickonce application?

703


Are there any third party logging components available?

723


how to change row background color in gridview

747


What is .net mobile utility controls. : Microsoft dot net mobile

722