Hi!
I have setup with solutions running on my machine with 2 instances and AzureCacheSessionStoreProvider that uses cloud.
Web.config contains following:
<sessionState mode="Custom" customProvider="AzureCacheSessionStoreProvider">
<providers>
<add name="AzureCacheSessionStoreProvider" type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache" cacheName="default" useBlobMode="true" dataCacheClientName="default"
sharedId="mySharedId" />
</providers>
</sessionState>
<section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" />
<dataCacheClients>
<dataCacheClient name="default">
<hosts>
<host name="myName.cache.windows.net" cachePort="22233" />
</hosts>
<securityProperties mode="Message">
<messageSecurity authorizationInfo="myKey" />
</securityProperties>
</dataCacheClient>
</dataCacheClients>
Simple check shows that sessions are different on two instances:
if (string.IsNullOrEmpty(Session["asdf"] as string))
Session["asdf"] = Settings.InstanceName;
Assert.IsTrue((Session["asdf"] as string) == Settings.InstanceName, "Different");
Code does not crash! But it works as expect when deployed to Azure.
Here
in the comments I found two guys reporting the same problem.
Anyone knows how this can be cured?