Preserving Session State with ASP.NET Web Applications in Network Load Balancing

Applies To: Windows Server 2003, Windows Server 2003 with SP1

If you use SqlServer or StateServer session state mode, session state might be lost when you run an ASP.NET Web application in a Network Load Balancing server cluster. To maintain session state across different Web servers in the cluster, the application path of the Web site (for example, \LM\W3SVC\2) in the IIS metabase must be the same for all of the Web servers in the cluster.

On one Web server, the instance ID of the Web site where the ASP.NET application is hosted might be 1 (where the application path is \LM\W3SVC\1). On another Web server, the instance ID of the Web site might be 5 (where the application path is \LM\W3SVC\5).

Note

Web sites created on a clean installation of IIS 6.0 will maintain their individual site numbers, as determined by the ServerComment metabase property, across the load-balanced installation. For more information about the ServerComment metabase property, see the ServerComment Metabase Property. For information about changing the application path of a Web site, see Synchronizing the Application Path of a Web Site.