I am trying to share a session from a main VB.Net Website and a subdomain C# MVC 4.
I have the same ASP.NET_SessionId Cookie present for both sites and in the Immediate Debugger I can see both Session objects have the same SessionID. However when I set a session from the VB.Net website, Session("TestSession") = "SimpleString"
, if i call the Session Object in the Immediate Window from the MVC Application the Count is 0.
This is also the case if i set a session in the MVC Application it is not found in the VB.Net Website.
Preferably I would like to use StateServer Mode but I have read that only SQLServer Mode works for cross domain support.
Here is the web.config that is present in both sites
<httpCookies domain=".example.localhost"/>
<sessionState mode="SQLServer" sqlConnectionString="Data Source=(local);Integrated Security=True" />
<machineKey validationKey="XXX" decryptionKey="XXX" validation="SHA1" compatibilityMode="Framework20SP1" />