Run aspnet_regsql.exe using the wizard to set up your ASPState database for .net 4. Then try to run a website against it...you get the following error:
'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.'
The script files in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ contain an error and the database is not properly set up. We found the script file problem which makes the script fail due to the double quotes around the 2:
CREATE PROCEDURE [dbo].[TempGetVersion]
@ver char(10) OUTPUT
set nocount on
SELECT @ver = "2"
The following blog led us down the correct path at finding the problem. The last comment is from us showing our temporary fix around the problem. We wound up correcting the script (putting single quotes around the 2), running it manually, so we could get it working.