Setting up Persistent Session State with SQL
Storing session state in SQL Server eliminates session log outs due to memory issues and web server restarts. This is because the session token is stored in a SQL database and not in memory. As long as the user maintains the same browser, state will be maintained.
Note that this does not resolve the issue of multiple browser windows. In this situation, it is not recommended that users maintain multiple session of LobbyCentral on the same computer.
- Log into the LobbyCentral server.
- Open a command window
- Go to c:\windows\Microsoft.NET\Frameworks\v4.0.30319
- Create the ASPState database by executing this command:
aspnet_regsql -ssadd -sstype p -S <dbServerName> -U <username> -P <password>
- Connect to the database server using SQL Management Studio.
- Verify that the ASPState database was created.
- Expand Security and right-click on Logins and select New Login.
- Set the login name to sessionStateUser and select SQL Server Authentication.
- Enter a strong password.
- Uncheck" Enforce Password Expiration" and "User must change password".
- Click User Mappings.
- Check the Map box for the ASPState database.
- Check "db_owner" under roles.
- Click OK to save the account.
Update the LobbyCentral Configuration File
Make a backup of c:\program files\fuhr software\lobbycentral\web\Web.config and then open web.config in Notepad.
Locate the tag and change it to the following:
<sessionState mode="SQLServer" sqlConnectionString="Data Source=<dbServerName>;User ID=sessionStateUser;Password=<password>" timeout="720" />
- dbServerName- IP or name of the database server
- password- user's password
Save and close the file.