Last post Jan 11, 2011 09:58 AM by ytseytlin
Jan 27, 2009 12:07 AM|ryandailey21|LINK
I've been having problems with Session state getting lost in a web farm with 2 servers. I am using the State Service to maintain state for both servers. One of the web servers is also hosting the state service. I set the <machineKey> for the servers.
The application paths have been synced in the IIS metabase. However, I am still loosing session when the request gets transferred to the other server. Does anyone know what could cause this?
Jan 27, 2009 06:25 AM|deesh1531982|LINK
check this link to configure Out-of-Process Session State with the ASP.NET State Service
Jan 28, 2009 02:22 PM|ryandailey21|LINK
But as I mentioned all of this has already been done. Both servers on it's own seems to successfully manage session state against the server. It's only when the round-robin kicks in and redirects the request to the other server that things get messed up.
The cookie is getting persisted as it has the same session ID, but it's a completely new session. And of course your session comes back when your request gets redirected back to the first server.
Jan 28, 2009 03:29 PM|yuren1978|LINK
Jan 29, 2009 09:05 AM|ryandailey21|LINK
That server variable was actually pretty handy. It turns out it was off by one letter. One server had "Root" while the other had "root" in the application path. Changed that and the servers started sharing session just fine. Thanks.
EDIT - That solved the problem
Jan 29, 2009 09:30 AM|yuren1978|LINK
Jan 11, 2011 09:58 AM|ytseytlin|LINK
I am having a similar problem and I hope someone could help me.
I have servers s1, s2
I have set all the machinekey elements to be the same
the web.configs are the same
Both servers independently write to the db
Both servers have the same AppID / AppName when querying ASPStateTempApplications: