In a Web Garden configuration there are multiple worker process processing the request. And session state values and variables are stored in memory of the worker process in
In-Process
mode. So as the worker process processing your request changes, your session is lost. So definitely,
In-Process
mode is not recommended for a web garden configuration.
Configuring a
State Server Mode
or
SQL Server Mode
are the better options in case of a web garden.
We have an article in CodeProject by Abhijit Jana which explains these scenarios very well. Have a look at it -
Exploring Session in ASP.Net[
^]
Hope that helps!