We have 2 load balanced CD servers. Session affinity is disabled on the load balancer and we are using MongoDB for session storage.
User authentication is performed on a separate site. They are redirected back to our servers and logged into Sitecore as a virtual user. Custom properties are set on the user profile such as first and last name.
Once signed in, the user is presented with a welcome message ie. "Hello Bob". The value Bob will only display on one server. If the user is bounced to the second server by refreshing it, will just display "Hello", without the custom property.
I have verified that the data is getting saved to the ClientData
table in core with the correct session Id.
I am at a loss on, what to look at now to get this to work. Any suggestions?
Session state from web.config
:
<sessionState mode="Custom" customProvider="mongo" cookieless="false" timeout="20">
<providers>
<add name="mongo"
type="Sitecore.SessionProvider.MongoDB.MongoSessionStateProvider,
Sitecore.SessionProvider.MongoDB"
connectionStringName="privateSession"
pollingInterval="2"
compression="true"
sessionType="private"/>
</providers>
Shared session state:
<sharedSessionState patch:source="Sitecore.Analytics.Tracking.config" defaultProvider="mongo">
<providers>
<clear />
<add name="InProc" type="System.Web.SessionState.InProcSessionStateStore" />
<add name="mongo" type="Sitecore.SessionProvider.MongoDB.MongoSessionStateProvider, Sitecore.SessionProvider.MongoDB" connectionStringName="sharedSession" pollingInterval="2" compression="true" sessionType="shared" patch:source="SharedSession.config" />
</providers>
<manager type="Sitecore.Analytics.Tracking.SharedSessionState.SharedSessionStateManager, Sitecore.Analytics">
<param ref="tracking/sharedSessionState/config" desc="configuration" />
</manager>
<config type="Sitecore.Analytics.Tracking.SharedSessionState.SharedSessionStateConfig, Sitecore.Analytics">
<param desc="maxLockAge">5000</param>
<param desc="timeoutBetweenLockAttempts">10</param>
</config>
</sharedSessionState>