Software developer can configure session state mode by default if he set it to “InProc”. In this case the other two settings have no effect. In this mode the information will be stored in the same process as the ASP.NET worker threads, i.e. software developer will expect best performance, but the least durability. If he restart web server, the state information will be lost.

C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development: Build applications with C#, .NET Core, Entity Framework Core, ASP.NET Core, and ML.NET using Visual Studio Code, 4th Edition
ASP.NET Core 3 and Angular 9: Full stack web development with .NET Core 3.1 and Angular 9, 3rd Edition
C# in Depth, 4th Edition

InProc option makes sense for most small web sites.    In a web farm scenario the option will not work. To allow session state to be shared between servers software developer must use the out-of-process or SQL server state service.


<?xml version=”1.0” encoding=”utf-8” ?>
     <!— other settings are omitted. —>
        cookieless=”AutoDetect” cookieName=”ASP.NET_SessionID”
        sqlConnectionString=”data source=;Integrated Security=SSPI”
        sqlCommandTimeout=”30” allowCustomSqlDatabase=”false”