Tuesday, December 9, 2008

Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL server. Please install ASP.NET Session State SQL Server version 2.0 or above.

This issue normally occurs when we use sql server for storing session. To overcome this issue, we have to do the following steps.

1) sessionState mode="SQLServer" allowCustomSqlDatabase="true" sqlConnectionString="data source=server_name;database=aspnetdb;user id=user;password=pass" cookieless="false" timeout="120" this tag should be in the web.config file.
2) Run the following command from the dot net installed directory.
aspnet_regsql.exe -ssadd -sstype c -d databasename -E

ex: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regsql.exe -ssadd -sstype c -d DATABASENAME -E

No comments: