I'm struggling with the following issue. The setup:
- ASP.NET webforms application on .NET 4.
- Session State by State Service.
- Three webservers. All three host the webapplication. One is also acting as the ARR Controller.
Webserver 1: Windows 2012. IIS 8. ASP.NET State Service. ARR Controller.
Webserver 2: Windows 2012. IIS 8.
Webserver 3: Windows Server 2008R2. IIS 7.5. ASP.NET 4.5.2 is installed.
While navigating/switching between the servers, the Httpcontext.Session is null:
HttpContext context = HttpContext.Current;
if (context.Session == null)
{
CurrentLogger.Logger.Info("Context.Session is null");
}
If I'm lucky, and the request redirects to the same server, It keeps the session.
The sessionState server is configured like this:
<sessionState mode="StateServer" stateConnectionString="tcpip=192.168.2.53:42424" cookieless="false" timeout="30" />
I've also set the machine Key:
<machineKey validationKey="[xxxxx]" decryptionKey="[xxxx]" validation="SHA1" />
I require all my cookies to be sent only over SSL. Using IIS logging I see that this isn't a problem. The auth & session cookies are beïng sent to all webservers.
What might cause my session to be null between the servers?