For Adding SQL mode session state
C:\ >aspnet_regsql -S localhost -U sa -P wrox -ssadd -sstype p
Start adding session state.
...........
Finished.
For Remove SQL mode session state
C:\ >aspnet_regsql -S localhost -U sa -P wrox -ssremove -sstype p
Start adding session state.
...........
Finished.
kullanılacak web.config satırı ise
<sessionState mode="SQLServer"sqlConnectionString="Data Source=localhost;User ID=***;Password=***"cookieless="false"timeout="1000" />