Use SQL Server to store and get session

Source: Internet
Author: User
Server|session|sqlserver ASP.net provides three ways to store sessions.
1 InProc
2 State Server
3 SQL Server
The first one is often used, and the 2nd is to use a machine named state server with its memory to store the session status of other machines, in fact, we can also store and get the session in SQL Server. Was it the first time that I heard.
The implementation process is described below.

Find this file
C:\WINNT\Microsoft.NET\Framework\v1.0.2914\ InstallSqlState.sql
This file, mount SQL Server (don't tell me Not)

2 Modify web.config, probably like the following
<sessionstate mode= "SQL Server"
sqlconnectionstring= "Data source=
Win2000;userid=
Sa;password= "cookieless= false" timeout=
"/>"

3 Use it. This will all be all right. Oh

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.