Apr 6 2008

Problem in SQL Server Session State - ASP.NET 3.5

*** Updated - April 7 2008  ***

I played a little bit with the command line I am using to install the SQL Server Session State database and it seems to work fine: To register the database for the SQL Server Session State on ASP.NET 2.0 or ASP.NET 3.5:

aspnet_regsql -C "Data Source=.;Integrated Security=True" -ssadd -sstype c -d SessionStateDB

In addition to this, you might need to grant access to: 'NT AUTHORITY\NETWORK SERVICE' on your database

Hope this solves your problem as it solved mine!!

*** Updated - April 7 2008  ***


I enabled a database with the schema tables used for SQL Server Session State as follows:

aspnet_regsql -S .\ -d aspnetdb -E -sstype c -ssadd


Then in the web.config file, I enabled SessionState as follows:

sqlConnectionString="data source=.\;initial catalog=aspnetdb;trusted_connection=true"
timeout="20" />


When I run my page, I recieve the following exception:

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.


It sounds strange, I am using the 2.0 version of the script!! Any ideas?


Tags: , , , ,