SessionState 2.0 Problem connecting to SQL Server
-
Thursday, March 23, 2006 1:55 PM
We are attempting to upgrade from 1.1 to 2.0. We are running SQL Server 2003, and it has SessionState 1.1 installed successfully. We installed 2.0 on the same server, but under a different database name. The userid and password that is used to connect to 1.1 was given dbowner permissions on the new database. When we attempt to use the application, we get the following error: 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.
I know it's installed. I just don't know how to determine why .net doesn't think it's installed. What error detecting can I do?
This is the connection string we're using:
<sessionState mode="SQLServer" allowCustomSqlDatabase="true" sqlConnectionString="data source=SQL1;database=aspnetdb;user id=uuuuuu;password=pppppp" cookieless="false" timeout="120"/>
This exact same connection string (without the custom database stuff) works for 1.1. I haven't found anything saying there's a problem using SQL Server 2003, or you can't run both at once. Could someone please give me some ideas on what I can do to debug the session State and find out where the problem exists?
All Replies
-
Friday, March 24, 2006 1:39 PMhave u set properties of site to 2.0 in iis manager?
-
Friday, March 24, 2006 2:19 PM
Yes, that folder is set to .net 2.0.
I created a new project to test with and had the same problem. I'm trying to find a new server to run sql server 2005 on to see if it's a problem with the current database on the current server. I'm trying to find another server to use as a db server to test with. -
Friday, March 24, 2006 3:52 PM
Nevermind. When my DB guy ran aspnet_regsql.exe, he didn't specify the session state parameters. The database was there but the session state piece itself wasn't.
-
Wednesday, November 29, 2006 4:17 PM
Hi Dean,
I'm the DBA, I don't see anywhere to set session state parameters when I run aspnet_regsql.exe. My developers are getting the error you got.
The server has both 1.1 and 2.0 ssstate db's/installations on it.
Can you ask your dba for details for me?
-
Wednesday, March 07, 2007 9:12 PM
- I was having the same problem. Try running aspnet_regsql.exe from the command line. Use -? to get a list of options. The option that worked for me was:
-ssadd -sstype c -d <databasename> -E
Good luck!
-
Wednesday, October 22, 2008 2:06 AM
Thanks, this solved the problem by installing the session state.
Just to be a little clearer: Run the following in the command prompt (be sure to run this in the correct directory)
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regsql.exe -ssadd -sstype c -d DATABASENAME -E
(Be sure to change DATABASENAME to the name of your database. This will begin to start the session state.)
Cheers
Johann
New Zealand
-
Sunday, November 09, 2008 3:45 PM
This last post was extremely useful! Thank you. I had been struggling with the message:
Event Type: Error
Event Source: App
Event Category: None
Event ID: 60015
Date: 11/9/2008
Time: 10:28:33 AM
Description: 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. StackTrace: System.Web.HttpException: 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.Having installed Asp.net Sessing State SQL Server Version using the wizard - and having things still failing...the switches provided here did the trick!
I can't tell you how happy I was to see:
insEmpTxLog - @TxType = VIEW - TxName = viewHome - SID:149197
-
Tuesday, May 26, 2009 5:10 AMHi johann
My problem is continue. i had ran these query in commond prompt. but i never get solution. every time see this message.
"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."
Pleas Help Me
Thanx and Regards
Rohit Gupta
Rohit Kumar -
Friday, November 20, 2009 4:19 PMgrohitk's problem is probably related to security -- the app cannot execute the TempGetVersion procedure (or any other procedure in the ASPState db in this case).
To those who would encounter this same problem, do not forget to grant your application's user context (ex: SOMEHOST\ASPNET) the necessary access rights to the ASPState database after doing Johann 's solution above.
For me, what worked was to add my ASPNET user to the db_owner role. If you want security to be tighter and not make ASPNET as a DBO, you would need to grant the ASPNET execute rights to all SP's in the database and read/write roles.
-
Sunday, December 27, 2009 9:19 AM
Hi johann
hi
My problem is continue. i had ran these query in commond prompt. but i never get solution. every time see this message.
"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."
Pleas Help Me
Thanx and Regards
Rohit Gupta
Rohit Kumar
i also got same error and tried the methods posted here but none worked. however i got the solution
Open the command prompt and navigate to
C:\Windows\Microsoft.NET\Framework\v4.0.21006>
Note : i am using .net framwork 4.0 and so this is my directory..yours may vary as per version of .net framework you use.
now run below command
aspnet_regsql.exe -S localhost -U sa -P coconut -d ForumDB -ssadd -sstype c
-S SERVER IP HERE
-U sa= user id for SQL login
-P coconut = password for SQL login. my password here is coconut
-d Forum = DB name here...mine is "ForumDB"
Hope it works for you.
Creativity is the only Tool that a Programmer is Gifted with.......

