1

So I used a machine key generation web app to generate a machineKey element. I then put it in the web.config in its appropriate spot. The server admin deployed to both servers and pointed the load balancer at them.

For whatever reason, when I go to the preprod load balanced site, it works fine. I login, do the stuff on site, all is well in the world. However, there is a user that repeatedly goes to the site and has issues where the symptom is session state being lost. I looked at his message and it is basically login succeeds, stores items in session state, redirects to a page, checks the items which come back as null and then gives he message.

Why am I not experiencing this but he is? More importantly, how do I make sure he doesn't keep losing session state?

Robert
  • 1,745
  • 5
  • 34
  • 61
  • 2
    You'll need sticky sessions or a shared state server. See http://stackoverflow.com/questions/16194328/enabling-sticky-sessions-on-a-load-balancer, http://stackoverflow.com/questions/2868316/sharing-sessions-across-applications-using-the-asp-net-session-state-service. – CodeCaster Feb 06 '15 at 12:31
  • Thanks CodeCaster. I'm seeing a bunch of mentions of using sessionState which admittedly I don't. One of the modes seems to be geared towards have a separate server hold the session state for the load balanced items, is there any configuration that must be done to achieve this on the target server? Can it be one of the two that are being load balanced (or the load balancer itself)? Not sure if IT will allow us to use the SQL Server method as they'd probably be concerned with impact on the databases. – Robert Feb 06 '15 at 15:03

1 Answers1

0

Found what the issue was, but unfortunately based on the question not enough information was given to probably come to this:

1) This issue was only impacting Internet Explorer as far as can be figured out.
2) The hostname included an underscore in the name (server administrator given)

This is a case where Internet Explorer gets it right. The hostname included an underscore which makes it invalid. Internet Explorer refuses to create a cookie due to this fact (at least by default. Not sure if you can override the behavior within Internet Explorer). My guess is that Firefox and Chrome just turn the blind eye to it and work accordingly.

After requesting and receiving a rename for the URL, Internet Explorer was working again.

Robert
  • 1,745
  • 5
  • 34
  • 61
  • I seem to be having similar issues; users in IE are having random Session loss, but our hostname has no special characters. The entire point of us having the second server was for redundancy if the first fails, so having a single shared Session State server just offsets the failure to a different single node. It's frustrating me, because I can't figure out why it's happening. – Andrew S Oct 16 '17 at 20:48