2

So here is the set up:

  • There are two virtual machines
  • Two different sites
  • Both sites appear on each VM
  • Both sites are load balanced
  • Both sites use session
  • Both sites are using the same session state sever
  • One works, the other does not

I have tried so many things to glean any useful info I can:

  • I made a test page that sets session with a date time and then writes it out. This showed me that session is being saved but once per machine as though it were "InProc".
  • Changing the session state to be saved on a different machine still didn't work
  • IIS is set up correctly because I swapped the site's host bindings and there was no difference.
  • Session works as expected on a different environment
  • The websites have the same file structure and root
  • The machine keys are the same

So what the hell is going on? Has anyone had anything like this before? Any suggestions because I'd try anything right now. This has been a problem for over a week!

Update: (as I try more things I'll put them here)

  • It is not cookies since I changed cookieless to true and it still didn't work
BritishDeveloper
  • 13,219
  • 9
  • 52
  • 62
  • 1
    When you say it doesn't work, what do you mean? Does the page come up? Is the session state just not being retained? Is there an error message? – Jeffrey Kevin Pry Jul 25 '11 at 10:24
  • it acts like InProc session. Where it is stored successfully but it is once per server. So because I have two machines I have two different DateTimes stored under the same Session Key – BritishDeveloper Jul 25 '11 at 10:35

2 Answers2

2

In order for session state to work correctly the site id's in applicationsHost.config have to be the same across all the servers.

1

See this answer to this question. Is the Application Path in the metabase exactly the same on each server?

Community
  • 1
  • 1
Graham Clark
  • 12,886
  • 8
  • 50
  • 82
  • how can I find out? Where should I look for the metabase? In terms of being in the same directory yes they are. Even the working site is right next to it in the same folder structure. – BritishDeveloper Jul 25 '11 at 11:11
  • I'm not exactly sure - possibly PowerShell for IIS7, or for IIS6 I think the Metabase Explorer tool in the Resource Kit will show you this: http://support.microsoft.com/kb/840671 – Graham Clark Jul 25 '11 at 11:59