Losing Session State with ASP.NET/SQL Server

后端 未结 3 462
半阙折子戏
半阙折子戏 2020-12-02 19:18

I have a ASP.NET MVC workflow configured as two websites managed by a load balancer. The websites use Sql Server as the session state provider and have authentication switch

3条回答
  •  情歌与酒
    2020-12-02 19:41

    Found the issue.

    When you create applications that you expect to share session state using Sql Server, they need the same ID configured in IIS. This is because the session ID that is generated is generated based on the application ID. (Internally the application ID is something like LM/W3SVC/1

    The two servers had different IDs for each application in IIS. The resolution is to change the ID under `Manage Website -> Advanced Settings' on each server.

    enter image description here

提交回复
热议问题