Skip to main content

Posts

Showing posts with the label session in SQL

How to Store Sessions in SQL Server

We can maintain the session for asp.net application in the following three ways. Inproc : This will store the session in the memory of the web server. This is mostly used and will be lost when the application crashes. But the advantage with this is the performance. As the session is stored in the web server itself, this is very fast compared to other methods. State Server: This will store the session in the memory of a machine, which is dedicated for the purpose of storing sessions. This is efficient and scalable. SQL Server: This will store the session in SQL Server. To store a session in SQL Server, we need to configure the sql server. This is also efficient, scalable and secure implementation of storing a session. Now Discuss about configuring the SQL server to store the state: This can be done by executing a simple file named 'aspnet_regsql.exe'. This file is located in the .NET framework folder. Follow the steps to configure the Database server, Open the command prompt and...