问题
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.
来源:https://stackoverflow.com/questions/40442430/asp-net-session-state-not-being-shared-in-redis