Generally we use either of InProc, StateServer or SQL Server Session mode for our application, but we also need to know the fundamental of Custom Session mode. This session mode is quite interesting, because Custom session gives full control to us to create every thing even session ID. you can write your own algorithm to generate session ID.
You can implement custom providers that store session data in other storage mechanisms simply by deriving fromSessionStateStoreProviderBase Class. You can also Generate New Session Id by ImplementingISessionIDManager.
This are the following methods are called during implementation of Custom Session
In Initialize methods we can set the Custom Provider. This will initialize the connection with that specified provider. SetItemExpireCallback used to set SessionTimeOut, we can register any methods that will call at the time of session expire. InitializeRequest is called on every request and CreateNewStoreDataused to create a new instance of SessionStateStoreData .