Tuesday, March 23, 2010

How to configure SQL Server for ASP.NET SQL Server Session State <sessionState mode="SQLServer" ../>

On your prompt (doesn’t matter if you’re on the SQL server machine or not), run the below command:
”system root”\Microsoft.NET\Framework\”version number”>aspnet_regsql.exe –S “server” -U sa -P “Password” -ssadd -sstype p
for eg:
C:\Windows\Microsoft.NET\Framework\v2.0.50727>aspnet_regsql.exe -S MySQLServerInstanceName -U sa -P password -ssadd -sstype p
OR
C:\WINNT\Microsoft.NET\Framework\v4.0.21006>aspnet_regsql.exe -S MySQLServerInstanceName -U sa -P password -ssadd -sstype p
Now you have ASPState database on your servers with the tables, stored procedures, jobs needed to handle SQL server mode session state.

No comments:

Disclaimer

All the opinions expressed on this blog are my own and don't necessarily represent my employer's positions, strategies or opinions.