Step 1:
In web.config,
<system.web>
<sessionState mode="SQLServer" allowCustomSqlDatabase="true" sqlConnectionString="server=KOTTA;database=SessionMgmt;uid=sa;pwd=asdf"></sessionState>
</system.web>
Step2:
In ms sql, created a database named 'SessionMgmt'.
Step3:
Run
'aspnet_regsql.exe'
using command prompt with following command lines,
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql -d SessionMgmt -S KOTTA -U sa -P asdf -ssadd -sstype c
-----------------------------------------------------------------------------------------------------------------------
[
^]This link really helped me