Article ID: 323262 - View products that this article applies to.
This article was previously published under Q323262
This article describes the information that you must have to configure a Web server cluster to use the SQL session state that runs in a failover cluster. If you anticipate many requests on your Microsoft ASP.NET applications, you may install a Web farm of Web servers that are running on Windows Network Load Balancing (WNLB).
By using WNLB, you can reveal a virtual access point to your users. WNLB shares the workload across all members of the Web farm transparently. If your Web application uses a session, you can store the ASP.NET session state in SQL Server to gain more reliability and to improve virtual access for the users.
ASP.NET offers significant versatility in saving a session state. This solves most problems that may occur while you run earlier ASP applications in a Web farm. You can configure the Web.config file of a particular application to use the SQL session state on a failover cluster.
Microsoft SQL Server offers you centralized storage of a session state in a Web farm. It also offers the transactional capabilities that provide reliability to most relational database systems. You can use SQL Server to save a session.
Configure ASP.NET to store session state in SQL ServerWhen you set the value of the mode attribute to SqlServer in the sessionState element of the Web.config file, an ASP.NET worker process stores the objects that belong to the client session collection in SQL Server at the end of each Web request.
For additional information about how to install SQL session state in a SQL Server cluster, click the following article number to view the article in the Microsoft Knowledge Base:
311209For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/311209/ )How to configure ASP.NET for persistent SQL Server session state management
317604To store the ASP.NET session state in SQL Server, change the <sessionState> element in the Web.config file as follows:
(http://support.microsoft.com/kb/317604/ )How to configure SQL Server to store ASP.NET session state
Note Verify that you use the correct case when you specify the <sessionState> element and the associated attribute values. This code is case sensitive.
Sample application for testing
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/307598/ )ASP.NET state management overview
(http://support.microsoft.com/kb/312906/ )How to create keys by using Visual C# .NET for use in Forms authentication
(http://support.microsoft.com/kb/313091/ )How to create keys by using Visual Basic .NET for use in Forms authentication
Contact us for more help
Connect with Answer Desk for expert help.