I'm trying to access the shared Sessions stored in SQL Server from multiple applications in different servers.
I already read this Sharing sessions across applications using the ASP.NET Session State Service but I had no luck.
Here's how I set up the web.config of both applications:
<sessionState
mode="SQLServer"
allowCustomSqlDatabase="true"
sqlConnectionString="Application Name=MyAppName; Data Source=MyDataSource; Initial Catalog=MyDBName; User Id=MyUser; Password=MyPassword"
cookieless="false"
timeout="250"
/>
And here is the machine key I set up in both config files:
<machineKey validationKey="key1" decryptionKey="key2" validation="SHA1" decryption="AES" />
Both the applications can read and write the database.
I also tweaked the TempGetAppID
stored procedure to overcome the application name limitations. In such way my SessionIDs share the same suffix.
That said, I still have 2 different records in the ASPStateTempSessions
table, with different SessionIDs.
Here's an example:
3nn53mh3j0vf3mrravuda11o9c8d4bee
oljchatkqzcje1ae1b3n2pst9c8d4bee
Any ideas would be appreciated!
EDIT 1
I tried with both Chrome and IE on a single tab.