In ASP.NET, there are 3 different modes for storing session information.
At OISSite.com, we support both InProc and SQLServer session. By default, ASP.NET session is stored in-process (InProc).
There are pros and cons for these modes.
InProc mode offers the fastest performance because session is stored in the IIS Worker Process. The downside of InProc session is that sessions can be lost if the worker process is recycled for whatever reason.
SQL Server session on the other hands is slower than InProc, about 15-20% slower, but the session information remains persistent even after the worker process is recycled.
You should choose an appropriate state management mode depending on your application. For example, if losing session is not acceptable, you should consider using SQL Session rather than InProc.
To enable SQL Server Session, follow the steps below:
< sessionState mode="SQLServer" allowCustomSqlDatabase = "true" sqlConnectionString="data Source=<SQLSERVERNAME>;database=<SQLDATABASENAME>;user id=<SQLUSER>;password=<SQLPASSWORD>" cookieless="false" timeout="15" />
