ASP.NET session state not being shared in Redis

2019-08-02 13:10发布

We are planning to migrate from ASPstate to Redis to store session. We installed the Redis MSI package on one of the servers and the c# application is hosted on a different server. We have multiple web applications within single application hosted in IIS.

The configuration for both applications looks like this:

<sessionState mode="Custom" customProvider="MySessionStateStore" timeout="180">
    <providers>
        <add name="MySessionStateStore" 
             type="Microsoft.Web.Redis.RedisSessionStateProvider" 
             host="serverIP"
             port="6379"
             accessKey=""
             ssl="false"
        />
    </providers>
</sessionState>

Now the problem is that session is not being shared between applications. We checked the machine key and found to be same both applications.

0条回答
登录 后发表回答