There are two steps got to follow to enable the SQL Server Session state to work
1. Configuring the database to support the SQL Server Session state.
2. Configuring your application to use SQL Server Session state.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ aspnet_regsql.exe
You can run this exe from window command prompt or you can directly run from SDK Command prompt.
Executing the following command enables SQL Server Session state for a database server named local and store it in a custom database called CustomSessionDB.
aspnet_regsql -C "Data Source=local;User Id=sa; Password=Sql2005" -ssadd -sstype c -d CustomSessionDB
<sessionState mode=" SQLServer" sqlConnectionString="data source=local;user id=sa;password=Sql2005;database=CustomSessionDB" timeout="30" allowCustomSqlDatabase ="true" />
No comments:
Post a Comment